Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream 0.3.2 #20

Merged
merged 57 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
03aa3a1
Workaround the installation issue #27
r9y9 Jan 28, 2022
79267bf
Merge pull request #28 from r9y9/workaround-setuptools-issue
r9y9 Jan 28, 2022
37046ef
parepare for v0.1.6
r9y9 Jan 28, 2022
e12f67d
Start a new dev cycle
r9y9 Jan 28, 2022
2e18bea
Update hts_engine_API
r9y9 Feb 5, 2022
35347fc
Update open_jtalk
r9y9 Feb 5, 2022
39fdf67
Update version to v0.2.0
r9y9 Feb 5, 2022
83f3bb2
[ci skip] update changelog
r9y9 Feb 5, 2022
2b9737e
Merge pull request #29 from r9y9/update-deps
r9y9 Feb 5, 2022
6486ed7
Start new dev cycle
r9y9 Feb 5, 2022
70e4a37
Fixees for Python 3.10
r9y9 Aug 7, 2022
b8ead58
bump version for dev
r9y9 Aug 7, 2022
0931978
Add a workaround for Numpy's ABI issue
r9y9 Aug 7, 2022
d4c59cd
Merge pull request #35 from r9y9/py310
r9y9 Aug 7, 2022
45c6ede
add codes
6gsn Sep 16, 2022
cf7c78f
update tests
6gsn Sep 16, 2022
93d1a90
add test for frontend
6gsn Sep 16, 2022
8f8a9f1
add run_marine option to tts()
6gsn Sep 18, 2022
a59b7f0
update the README for run_marin_option
6gsn Sep 18, 2022
b825fd2
update error message for importing marine
6gsn Sep 18, 2022
a4a4e81
fix for lint
6gsn Sep 18, 2022
f1b87ca
add marine's license
6gsn Sep 19, 2022
aae4fce
update readme
6gsn Sep 19, 2022
34528ad
add new API in docs/pyopenjtalk.rst
6gsn Sep 19, 2022
2c10e3f
add chage log
6gsn Sep 19, 2022
23e7363
fix typo
6gsn Sep 19, 2022
7361ec6
Update pyopenjtalk/__init__.py
6gsn Sep 19, 2022
11c2b97
Update pyopenjtalk/__init__.py
6gsn Sep 19, 2022
ba42f0b
Update pyopenjtalk/__init__.py
6gsn Sep 19, 2022
60d85ff
add link
6gsn Sep 19, 2022
c676f56
Merge pull request #40 from 6gsn/introduce/marine
r9y9 Sep 19, 2022
d6ff437
prep for release
r9y9 Sep 19, 2022
be70add
Update setup.py
r9y9 Apr 7, 2023
d1781bf
Fix lint
r9y9 Apr 7, 2023
ecd587a
Use oldest-supported-numpy
sabonerune Apr 5, 2023
fc55334
Merge pull request #45 from sabonerune/use-oldest-numpy
r9y9 Apr 8, 2023
aec2cff
ADD: build-backend
sabonerune Jun 19, 2023
f166130
Merge pull request #53 from sabonerune/add/build-backend
r9y9 Jun 24, 2023
e040337
Limit maximum Cython version to avoid build break
sharvil Jul 19, 2023
6bb1807
Merge pull request #57 from lmnt-com/master
r9y9 Jul 20, 2023
4400e2c
prep for v0.3.1
r9y9 Jul 20, 2023
c826bfe
start new dev cycle
r9y9 Jul 20, 2023
471a6a6
FIX: Fix compile error when Cython 3.0
sabonerune Jul 19, 2023
995bcb4
Merge pull request #58 from sabonerune/enh/cython-3
r9y9 Jul 22, 2023
bf0780d
ENH: Fix requires numpy version
sabonerune Jul 25, 2023
c5a693a
Merge pull request #59 from sabonerune/enh/support-np2
r9y9 Jul 27, 2023
2e59f81
ENH: add build-system requires cmake
sabonerune Jul 20, 2023
d55dd81
Merge pull request #60 from sabonerune/enh/add-req-cmake
r9y9 Jul 28, 2023
7b892c8
ENH: Remove Cython from install_requires.
sabonerune Aug 3, 2023
ea925e8
Merge pull request #61 from sabonerune/fix/install-requires-cython
r9y9 Aug 12, 2023
807e406
Checking cmake is in the system path for windows
YCHuang2112 Aug 20, 2023
b2bb286
update lint error
YCHuang2112 Aug 20, 2023
c5e10f4
fix lint error
YCHuang2112 Aug 21, 2023
96f3cf3
remove vscode setting file
YCHuang2112 Aug 21, 2023
c8cfc62
Merge pull request #64 from YCHuang2112sub/master
r9y9 Aug 21, 2023
e6bc65f
prepare for v0.3.2
r9y9 Aug 22, 2023
6aca08a
Merge tag 'v0.3.2' into merge-upstream-0.3.2
Hiroshiba Sep 8, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[lint]"
pip install -e ".[dev]"
- name: Lint with pysen
run: |
pysen run lint
Expand Down
4 changes: 2 additions & 2 deletions pyopenjtalk/htsengine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ np.import_array()
cimport cython
from libc.stdlib cimport malloc, free

from htsengine cimport HTS_Engine
from htsengine cimport (
from .htsengine cimport HTS_Engine
from .htsengine cimport (
HTS_Engine_initialize, HTS_Engine_load, HTS_Engine_clear, HTS_Engine_refresh,
HTS_Engine_get_sampling_frequency, HTS_Engine_get_fperiod,
HTS_Engine_set_speed, HTS_Engine_add_half_tone,
Expand Down
24 changes: 12 additions & 12 deletions pyopenjtalk/openjtalk.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ np.import_array()
cimport cython
from libc.stdlib cimport calloc

from openjtalk.mecab cimport Mecab, Mecab_initialize, Mecab_load, Mecab_analysis
from openjtalk.mecab cimport Mecab_get_feature, Mecab_get_size, Mecab_refresh, Mecab_clear
from openjtalk.mecab cimport mecab_dict_index, createModel, Model, Tagger, Lattice
from openjtalk.njd cimport NJD, NJD_initialize, NJD_refresh, NJD_print, NJD_clear
from openjtalk cimport njd as _njd
from openjtalk.jpcommon cimport JPCommon, JPCommon_initialize,JPCommon_make_label
from openjtalk.jpcommon cimport JPCommon_get_label_size, JPCommon_get_label_feature
from openjtalk.jpcommon cimport JPCommon_refresh, JPCommon_clear
from openjtalk cimport njd2jpcommon
from openjtalk.text2mecab cimport text2mecab
from openjtalk.mecab2njd cimport mecab2njd
from openjtalk.njd2jpcommon cimport njd2jpcommon
from .openjtalk.mecab cimport Mecab, Mecab_initialize, Mecab_load, Mecab_analysis
from .openjtalk.mecab cimport Mecab_get_feature, Mecab_get_size, Mecab_refresh, Mecab_clear
from .openjtalk.mecab cimport mecab_dict_index, createModel, Model, Tagger, Lattice
from .openjtalk.njd cimport NJD, NJD_initialize, NJD_refresh, NJD_print, NJD_clear
from .openjtalk cimport njd as _njd
from .openjtalk.jpcommon cimport JPCommon, JPCommon_initialize,JPCommon_make_label
from .openjtalk.jpcommon cimport JPCommon_get_label_size, JPCommon_get_label_feature
from .openjtalk.jpcommon cimport JPCommon_refresh, JPCommon_clear
from .openjtalk cimport njd2jpcommon
from .openjtalk.text2mecab cimport text2mecab
from .openjtalk.mecab2njd cimport mecab2njd
from .openjtalk.njd2jpcommon cimport njd2jpcommon
from libc.string cimport strlen

cdef inline int Mecab_load_ex(Mecab *m, char* dicdir, char* userdic):
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[build-system]
requires = [
"wheel",
"setuptools<v60.0",
"cython>=0.28.0, <3.0", # NOTE: https://github.com/r9y9/pyopenjtalk/issues/55
"numpy>=1.20.0",
"cython>=0.28.0,<3.0.0",
"cmake",
"numpy>=1.25.0; python_version>='3.9'",
"oldest-supported-numpy; python_version<'3.9'",
]
build-backend = "setuptools.build_meta"

[tool.pysen]
version = "0.10.2"
Expand Down
44 changes: 41 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

platform_is_windows = sys.platform == "win32"

version = "0.3.0"
version = "0.3.2"

min_cython_ver = "0.21.0"
try:
Expand Down Expand Up @@ -71,6 +71,43 @@ def build_extensions(self):
raise RuntimeError("Cython is required to generate C++ code")


def check_cmake_in_path():
try:
result = subprocess.run(
["cmake", "--version"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
if result.returncode == 0:
# CMake is in the system path
return True, result.stdout.strip()
else:
# CMake is not in the system path
return False, None
except FileNotFoundError:
# CMake command not found
return False, None


if os.name == "nt": # Check if the OS is Windows
# Check if CMake is in the system path
cmake_found, cmake_version = check_cmake_in_path()

if cmake_found:
print(
f"CMake is in the system path. Version: \
{cmake_version}"
)
else:
raise SystemError(
"CMake is not found in the \
system path. Make sure CMake \
is installed and in the system \
path."
)


# Workaround for `distutils.spawn` problem on Windows python < 3.9
# See details: [bpo-39763: distutils.spawn now uses subprocess (GH-18743)]
# (https://github.com/python/cpython/commit/1ec63b62035e73111e204a0e03b83503e1c58f2e)
Expand Down Expand Up @@ -277,7 +314,6 @@ def run(self):
cmdclass=cmdclass,
install_requires=[
"numpy >= 1.20.0",
"cython >= " + min_cython_ver,
"six",
"tqdm",
],
Expand All @@ -291,7 +327,8 @@ def run(self):
"ipython",
"jupyter",
],
"lint": [
"dev": [
"cython >= " + min_cython_ver + ",<3.0.0",
"pysen",
"types-setuptools",
"mypy<=0.910",
Expand All @@ -301,6 +338,7 @@ def run(self):
"flake8-bugbear",
"isort>=4.3,<5.2.0",
"types-decorator",
"importlib-metadata<5.0",
],
"test": ["pytest", "scipy"],
"marine": ["marine>=0.0.5"],
Expand Down
Loading