Skip to content

Commit

Permalink
Test wheels build for Python 3.13 (#1024)
Browse files Browse the repository at this point in the history
* Include Python 3.13 when building docker containers
* Test wheels build for Python 3.13
* Updated table with binary releases
* Do not build for Python 3.13 on musllinux i686
* Require setuptools 75.3.0 for all versions of Python due to security vulnerable in setuptools < 70.0.0
  • Loading branch information
jesper-friis authored Dec 14, 2024
1 parent 8c94af3 commit 1ae9750
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 64 deletions.
45 changes: 9 additions & 36 deletions .github/workflows/ci_build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,68 +22,41 @@ jobs:
- os: ubuntu-20.04
system_type: ["manylinux", "_2_34"]
arch: x86_64
py_minors: 8,12
#- os: ubuntu-20.04
# system_type: ["manylinux", "_2_28"]
# arch: x86_64
# py_minors: 8,12
#- os: ubuntu-20.04
# system_type: ["manylinux", "2014"]
# arch: x86_64
# py_minors: 8,12
#- os: ubuntu-20.04
# system_type: ["manylinux", "2010"]
# arch: x86_64
# py_minors: 8,9
py_minors: 8,13

# 64-bit musllinux
- os: ubuntu-20.04
system_type: ["musllinux", "_1_2"]
arch: x86_64
py_minors: 8,11
# Python 3.12 fails since cibuildwheel still depends on distutils
# for musllinux
#- os: ubuntu-20.04
# system_type: ["musllinux", "_1_1"]
# arch: x86_64
# py_minors: 8,11
py_minors: 8,13

# 32-bit manylinux
# Python 3.8 does not have numpy2
- os: ubuntu-20.04
system_type: ["manylinux", "2014"]
arch: i686
py_minors: 10,12
# Python 3.12 fails since cibuildwheel still depends on distutils
# for musllinux
#- os: ubuntu-20.04
# system_type: ["manylinux", "2010"]
# arch: i686
# py_minors: 8,9
py_minors: 10,13

# 32-bit musllinux
# Python 3.8 does not have numpy2
# Python 3.12 fails since cibuildwheel still depends on distutils
- os: ubuntu-20.04
system_type: ["musllinux", "_1_2"]
arch: i686
py_minors: 8,11
# Python 3.12 fails since cibuildwheel still depends on distutils
# for musllinux
#- os: ubuntu-20.04
# system_type: ["musllinux", "_1_1"]
# arch: i686
# py_minors: 8,11
py_minors: 9,11

# 64-bit Windows
- os: windows-2019
system_type: ["win", ""]
arch: amd64
py_minors: 8,12
py_minors: 8,13

# 32-bit Windows
# See issue #220: https://github.com/SINTEF/dlite/issues/220
# - os: windows-2019
# system_type: ["win32", ""]
# arch: ""
# py_minors: 7,10
# py_minors: 8,13

# 64-bit (Intel) macOS
# See issue #221: https://github.com/SINTEF/dlite/issues/221
Expand Down
15 changes: 7 additions & 8 deletions doc/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ DLite uses [cibuildwheel] for providing binary releases for Linux and
Windows on various platforms and versions of Python. The provided
wheels are shown in the following table.


| Platform | Arch | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 |
|------------------|--------|-----|-----|------|------|------|
| [manylinux_2_34] | x86_64 | x | x | x | x | x |
| [manylinux2014] | i686 | | | x | x | x |
| [musllinux_1_2] | x86_64 | x | x | x | x | x |
| [musllinux_1_2] | i686 | | x | x | x | |
| windows | x86_64 | x | x | x | x | x |
| Platform | Arch | 3.8 | 3.9 | 3.10 | 3.11 | 3.12 | 3.13 |
|------------------|--------|-----|-----|------|------|------|------|
| [manylinux_2_34] | x86_64 | x | x | x | x | x | x |
| [manylinux2014] | i686 | | | x | x | x | x |
| [musllinux_1_2] | x86_64 | x | x | x | x | x | x |
| [musllinux_1_2] | i686 | | x | x | x | | |
| windows | x86_64 | x | x | x | x | x | x |


Development installation
Expand Down
22 changes: 5 additions & 17 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
[build-system]
requires = [
"setuptools>=58",
"wheel>=0.37",
"numpy>=1.14.5,<2.1.3",
"swig==4.3.0",
"cmake==3.31.1",
"swig==4.1.1",
#"setuptools==57.5.0; python_version<'3.9'",
#"setuptools==75.3.0; python_version>='3.9'",
"setuptools==75.3.0",
"wheel==0.41.3",
]


#requires = [
# #"setuptools>=58; python_version<'3.12'",
# #"wheel>=0.37; python_version<'3.12'",
# "setuptools==67.6.1; python_version<'3.9'",
# "setuptools>=68.2.1; python_version>='3.9'",
# "wheel>=0.37",
# "numpy>=1.14.5,<2.1.3",
# "cmake==3.31.1",
# "swig==4.1.1",
#]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
Expand All @@ -31,12 +21,10 @@ test-command = "python {package}\\..\\bindings\\python\\tests\\test_python_bindi
[tool.cibuildwheel.linux]
environment-pass = ["CI_BUILD_CMAKE_ARGS", "CI_PIP_CACHE_DIR"]
before-build = [
#"python -m pip install --cache-dir /ci/pip_cache --prefer-binary -r {project}/requirements.txt -r {project}/requirements_dev.txt",
"rm -rf {project}/python/build/temp*",
"export PYVER=$(python -c \"import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')\")",
"export ABITAG=$(python -c \"import sys; cp=f'cp{sys.version_info.major}{sys.version_info.minor}'; print(f'{cp}-{cp}{sys.abiflags}')\")",
]
before-test = "python -m pip install --cache-dir /ci/pip_cache --prefer-binary -r {project}/requirements.txt"
test-command = "python {package}/../bindings/python/tests/test_python_bindings.py"

[tool.cibuildwheel.linux.environment]
Expand Down
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def run(self):
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
],
build_requires=requirements_dev,
Expand Down
8 changes: 5 additions & 3 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Requirements building
swig==4.3.0
cmake==3.31.1
setuptools==67.6.1; python_version<"3.9"
setuptools>=68.2.1; python_version>="3.9"
#setuptools==67.5.0; python_version<"3.9"
#setuptools==75.3.0; python_version>="3.9"
setuptools==75.3.0
wheel==0.41.3

# Requirements for running tests
mongomock>=4.1.2,<5
mongomock==4.2.0.post1

0 comments on commit 1ae9750

Please sign in to comment.