Skip to content

Commit

Permalink
Merge pull request #690 from jarrodmillman/py312-wheels
Browse files Browse the repository at this point in the history
Build Python 3.12 wheels
  • Loading branch information
rgommers committed Sep 18, 2023
2 parents 44ab075 + 7517969 commit 1055277
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/wheel_tests_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
cibw_python: ["cp39-*", "cp310-*", "cp311-*"]
cibw_python: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_manylinux: [ manylinux2014 ]
cibw_arch: [ "x86_64"]
steps:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
cibw_python: ["cp39-*", "cp310-*", "cp311-*"]
cibw_python: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
cibw_manylinux: [ manylinux2014 ]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest]
cibw_python: ["cp39-*", "cp310-*" , "cp311-*" ]
cibw_python: ["cp39-*", "cp310-*" , "cp311-*", "cp312-*"]
cibw_arch: ["x86_64", "arm64"]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
matrix:
os: [windows-latest]
cibw_arch: ["AMD64", "x86"]
cibw_python: ["cp39-*", "cp310-*", "cp311-*"]
cibw_python: ["cp39-*", "cp310-*", "cp311-*", "cp312-*"]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install twine
pip install "cython<3" numpy
pip install cython numpy
- uses: actions/download-artifact@v3
id: download
Expand Down
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
build-backend = "mesonpy"
requires = [
"meson-python>=0.14.0",
"Cython>=0.29.35", # when updating version, also update check in meson.build
# when updating Cython version, also update check in meson.build
"Cython>=0.29.35,<3.0; python_version>='3.12' and platform_system=='Windows'",
"Cython>=0.29.35; python_version<'3.12' or platform_system!='Windows'",

# When numpy 2.0.0rc1 comes out, we should update this to build against 2.0,
# and then runtime depend on the range 1.22.X to <2.3. No need to switch to
Expand All @@ -18,15 +20,17 @@ requires = [
# default numpy requirements
"numpy==1.22.4; python_version<='3.10' and platform_python_implementation != 'PyPy'",
"numpy==1.23.3; python_version=='3.11' and platform_python_implementation != 'PyPy'",
"numpy==1.26.0; python_version=='3.12' and platform_python_implementation != 'PyPy'",
# For Python versions which aren't yet officially supported, we specify an
# unpinned NumPy which allows source distributions to be used and allows
# wheels to be used as soon as they become available.
"numpy>=1.26.0b1; python_version>='3.12'",
"numpy; python_version>='3.13'",
"numpy; python_version>='3.9' and platform_python_implementation=='PyPy'",
]

[project]
name = "PyWavelets"
version = "1.5.0.dev0"
# TODO: add `license-files` once PEP 639 is accepted (see meson-python#88)
# at that point, no longer include them in `py3.install_sources()`
license = {file = "LICENSE"}
Expand All @@ -38,7 +42,7 @@ requires-python = ">=3.9"
dependencies = [
# TODO: update to "pin-compatible" once possible, see
# https://github.com/FFY00/meson-python/issues/29
"numpy>=1.22.4",
"numpy>=1.22.4,<2.0",
]
readme = "README.rst"
classifiers = [
Expand All @@ -54,9 +58,9 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules"
]
dynamic = ['version']

[project.urls]
homepage = "https://github.com/PyWavelets/pywt"
Expand Down

3 comments on commit 1055277

@luckman212
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabiocaccamo
Copy link

@fabiocaccamo fabiocaccamo commented on 1055277 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rgommers the latest version published on PyPi can't be installed successfully on Python 3.12, could you release a new version please?

FYI this is the error occurring during installation:

Collecting PyWavelets (from imagehash==4.3.1->-r requirements.txt (line 2))
  Downloading PyWavelets-1.4.1.tar.gz (4.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 93.2 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  Γ— Getting requirements to build wheel did not run successfully.
  β”‚ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
          backend = _build_backend()
                    ^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
          obj = import_module(mod_path)
                ^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/importlib/__init__.py", line 90, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 994, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "/tmp/pip-build-env-l9419rz6/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
          import setuptools.version
        File "/tmp/pip-build-env-l9419rz6/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
          import pkg_resources
        File "/tmp/pip-build-env-l9419rz6/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2191, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Γ— Getting requirements to build wheel did not run successfully.
β”‚ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Error: Process completed with exit code 1.

@rgommers
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rgommers the latest version published on PyPi can't be installed successfully on Python 3.12, could you release a new version please?

Done now: https://pypi.org/project/PyWavelets/1.5.0/

Please sign in to comment.