Skip to content

Commit

Permalink
Merge pull request #2319 from takluyver/py-3.12
Browse files Browse the repository at this point in the history
Build & test wheels on Python 3.12
  • Loading branch information
takluyver committed Oct 5, 2023
2 parents 7048fcb + 3025b04 commit bc68588
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
18 changes: 15 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
pool:
vmImage: ubuntu-20.04
variables:
CIBW_BUILD: cp3{8,9,10,11}-manylinux_x86_64
CIBW_BUILD: cp3{8,9,10,11,12}-manylinux_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/h5py/manylinux2014_x86_64-hdf5
# Include less debugging info for smaller wheels (default is -g2)
CIBW_ENVIRONMENT: "CFLAGS=-g1"
Expand All @@ -43,7 +43,7 @@ jobs:
HDF5_VERSION: 1.14.2
HDF5_DIR: $(HDF5_CACHE_DIR)/$(HDF5_VERSION)
HDF5_VSVERSION: "16-64"
CIBW_BUILD: cp3{8,9,10,11}-win_amd64
CIBW_BUILD: cp3{8,9,10,11,12}-win_amd64
steps:
- template: ci/azure-pipelines-wheels.yml
parameters:
Expand All @@ -60,7 +60,7 @@ jobs:
HDF5_DIR: $(HDF5_CACHE_DIR)/$(HDF5_VERSION)
CIBW_BUILD_VERBOSITY_MACOS: 3
CIBW_ARCHS_MACOS: $(arch)
CIBW_BUILD: cp3{8,9,10,11}-macosx_*
CIBW_BUILD: cp3{8,9,10,11,12}-macosx_*
CIBW_ENVIRONMENT_MACOS: LD_LIBRARY_PATH="$(HDF5_CACHE_DIR)/$(HDF5_VERSION)/lib:${LD_LIBRARY_PATH}" PKG_CONFIG_PATH="$(HDF5_CACHE_DIR)/$(HDF5_VERSION)/lib/pkgconfig:${PKG_CONFIG_PATH}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_FALLBACK_LIBRARY_PATH=$(HDF5_CACHE_DIR)/$(HDF5_VERSION)/lib delocate-listdeps {wheel} &&
Expand Down Expand Up @@ -163,6 +163,10 @@ jobs:
python.version: '3.11'
TOXENV: py311-test-deps,py311-test-mindeps,py311-test-deps-pre
WHL_FILE: h5py*-cp311-*manylinux2014_x86_64.whl
py312:
python.version: '3.12'
TOXENV: py312-test-deps,py312-test-mindeps,py312-test-deps-pre
WHL_FILE: h5py*-cp312-*manylinux2014_x86_64.whl

steps:
- template: ci/azure-pipelines-test-wheels.yml
Expand Down Expand Up @@ -238,6 +242,10 @@ jobs:
python.version: '3.11'
TOXENV: py311-test-deps,py311-test-mindeps,py311-test-deps-pre
WHL_FILE: h5py*-cp311-*.whl
py312:
python.version: '3.12'
TOXENV: py312-test-deps,py312-test-mindeps,py312-test-deps-pre
WHL_FILE: h5py*-cp312-*.whl

steps:
- template: ci/azure-pipelines-test-wheels.yml
Expand Down Expand Up @@ -294,6 +302,10 @@ jobs:
python.version: '3.11'
TOXENV: py311-test-deps,py311-test-mindeps,py311-test-deps-pre
WHL_FILE: h5py*-cp311-*.whl
py312:
python.version: '3.12'
TOXENV: py312-test-deps,py312-test-mindeps,py312-test-deps-pre
WHL_FILE: h5py*-cp312-*.whl

steps:
- template: ci/azure-pipelines-test-wheels.yml
Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ steps:
- bash: |
set -o errexit
python -m pip install --upgrade pip
pip install cibuildwheel==2.11.1
pip install cibuildwheel==2.16.2
displayName: 'Install cibuildwheel'

- script: env
Expand Down
7 changes: 3 additions & 4 deletions ci/fix_paths.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import distutils.sysconfig
from glob import glob
import os
import sysconfig
from glob import glob
from os.path import join as pjoin, basename
from shutil import copy
from sys import platform
Expand All @@ -9,8 +9,7 @@ def main():
"""
Copy HDF5 DLLs into installed h5py package
"""
# This is the function Tox also uses to locate site-packages (Apr 2019)
sitepackagesdir = distutils.sysconfig.get_python_lib(plat_specific=True)
sitepackagesdir = sysconfig.get_path('platlib')
print("site packages dir:", sitepackagesdir)

hdf5_path = os.environ.get("HDF5_DIR")
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# We want an envlist like
# envlist = {py36,py37,pypy3}-{test}-{deps,mindeps}-{,mpi4py}-{,pre},nightly,docs,checkreadme,pre-commit
# but we want to skip mpi and pre by default, so this envlist is below
envlist = {py38,py39,py310,py311,pypy3}-{test}-{deps,mindeps},nightly,docs,apidocs,checkreadme,pre-commit,rever
envlist = {py38,py39,py310,py311,py312,pypy3}-{test}-{deps,mindeps},nightly,docs,apidocs,checkreadme,pre-commit,rever
isolated_build = True

[testenv]
Expand All @@ -15,6 +15,7 @@ deps =
py39-deps: numpy>=1.19.3
py310-deps: numpy>=1.21.3
py311-deps: numpy>=1.23.2
py312-deps: numpy>=1.26.0

mindeps: oldest-supported-numpy

Expand Down

0 comments on commit bc68588

Please sign in to comment.