Skip to content

Commit

Permalink
Merge pull request #35 from r9y9/py310
Browse files Browse the repository at this point in the history
Fixees for Python 3.10
  • Loading branch information
r9y9 authored Aug 7, 2022
2 parents 6486ed7 + 0931978 commit d4c59cd
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 11 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
include:
- os: ubuntu-latest
python-version: 3.7
- os: ubuntu-latest
python-version: 3.8
- os: ubuntu-latest
python-version: 3.9
- os: ubuntu-latest
python-version: '3.10'
- os: macos-latest
python-version: 3.9
- os: windows-latest
python-version: 3.9

steps:
- uses: actions/checkout@v2
Expand All @@ -36,4 +47,4 @@ jobs:
- name: Test with pytest
run: |
pip install pytest
pytest
pytest
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ Out[3]: 'コンニチワ'

## Acknowledgements

HTS Working Group for their dedicated efforts to develop and maintain Open JTalk.
HTS Working Group for their dedicated efforts to develop and maintain Open JTalk.
6 changes: 5 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Change log
==========

v0.2.1 <2022-xx-xx>
v0.3.0 <2022-xx-xx>
-------------------

Newer numpy (>v1.20.0) is required to avoid ABI compatibility issues. Please check the updated installation guide.

* `#35`_: Fixes for Python 3.10.

v0.2.0 <2022-02-06>
-------------------
Expand Down Expand Up @@ -86,3 +89,4 @@ Initial release with OpenJTalk's text processsing functionality
.. _#25: https://github.com/r9y9/pyopenjtalk/pull/25
.. _#27: https://github.com/r9y9/pyopenjtalk/issues/27
.. _#29: https://github.com/r9y9/pyopenjtalk/pull/29
.. _#35: https://github.com/r9y9/pyopenjtalk/pull/35
18 changes: 18 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ The latest release is availabe on pypi. You can install it by:
pip install pyopenjtalk
Workaround for ``ValueError: numpy.ndarray size changed, may indicate binary incompatibility``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This type of errors comes from the Numpys' ABI breaking changes. If you see ``ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject`` or similar, please make sure to install numpy first, and then install pyopenjtalk by:

.. code::
pip install pyopenjtalk --no-build-isolation
or:

.. code::
pip install git+https://github.com/r9y9/pyopenjtalk --no-build-isolation
The option ``--no-build-isolation`` tells pip not to create a build environment, so the pre-installed numpy is used to build the packge. Hense there should be no Numpy's ABI issues.

.. toctree::
:maxdepth: 1
:caption: Notebooks
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
requires = [
"wheel",
"setuptools<v60.0",
"cython>=0.21.0",
"numpy<v1.20.0",
"cython>=0.28.0",
"numpy>=1.20.0",
]

[tool.pysen]
version = "0.9"
version = "0.10.2"

[tool.pysen.lint]
enable_black = true
Expand All @@ -18,4 +18,4 @@ mypy_preset = "strict"
line_length = 88
py_version = "py37"
[[tool.pysen.lint.mypy_targets]]
paths = ["."]
paths = ["."]
7 changes: 5 additions & 2 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.2.1"
version = "0.3.0"

min_cython_ver = "0.21.0"
try:
Expand Down Expand Up @@ -276,7 +276,7 @@ def run(self):
ext_modules=ext_modules,
cmdclass=cmdclass,
install_requires=[
"numpy >= 1.8.0",
"numpy >= 1.20.0",
"cython >= " + min_cython_ver,
"six",
"tqdm",
Expand All @@ -296,9 +296,11 @@ def run(self):
"types-setuptools",
"mypy<=0.910",
"black>=19.19b0,<=20.8",
"click<8.1.0",
"flake8>=3.7,<4",
"flake8-bugbear",
"isort>=4.3,<5.2.0",
"types-decorator",
],
"test": ["pytest", "scipy"],
},
Expand All @@ -313,6 +315,7 @@ def run(self):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
Expand Down

0 comments on commit d4c59cd

Please sign in to comment.