Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[build-system]
requires = [
"setuptools<v60.0",
"setuptools",
"looseversion>=1.3.0,<2.0.0",
"cython>=0.28.0,<3.0.0",
"cmake<4.0.0",
"numpy>=1.25.0; python_version>='3.9'",
Expand All @@ -15,9 +16,9 @@ version = "0.10.2"
enable_black = true
enable_flake8 = true
enable_isort = true
enable_mypy = false # TODO: enable mypy in the future
enable_mypy = false # TODO: enable mypy in the future
mypy_preset = "strict"
line_length = 88
py_version = "py37"
[[tool.pysen.lint.mypy_targets]]
paths = ["."]
paths = ["."]
14 changes: 6 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import os
import subprocess
import sys
from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
from distutils.version import LooseVersion
from looseversion import LooseVersion
from glob import glob
from itertools import chain
from os.path import exists, join
from subprocess import run

import numpy as np
import setuptools.command.build_py
Expand Down Expand Up @@ -132,7 +129,7 @@ def test_quoted_arg_change():
file_encoding = "utf8"
arg_value = '"ARG"'

spawn(
subprocess.run(
[
sys.executable,
"-c",
Expand All @@ -142,13 +139,14 @@ def test_quoted_arg_change():
output_mode,
file_encoding,
arg_value,
]
],
check=True,
)

# read
with open(file_name, mode="r", encoding=file_encoding) as fd:
return fd.readline() != arg_value
except (DistutilsExecError, TypeError):
except (TypeError, subprocess.CalledProcessError):
return False


Expand Down Expand Up @@ -187,7 +185,7 @@ def escape_macros(macros):

# NOTE: The wrapped OpenJTalk does not depend on HTS_Engine,
# but since HTSEngine is included in CMake's dependencies, it refers to a dummy path.
r = run(["cmake", "..", "-DHTS_ENGINE_INCLUDE_DIR=.", "-DHTS_ENGINE_LIB=dummy"])
r = subprocess.run(["cmake", "..", "-DHTS_ENGINE_INCLUDE_DIR=.", "-DHTS_ENGINE_LIB=dummy"])
r.check_returncode()
os.chdir(cwd)

Expand Down