Skip to content

Commit 6a873ec

Browse files
committed
BUILD,CI: Use latest numpy version to build wheels.
This ensures we use the latest available numpy version to build wheels. We also no longer build the wheels on ARM64 arch of MacOS since they are built on the x86_64 arch and thus cannot be tested on the CI release pipeline. As recommended by the CIBUILDWHEEL team, we have users build the ARM64 wheels on MacOS natively during installation of the package via source distribution. Both the above address the bug reported in #129, since the bug originates from numpy's 2.1.3 version used to build wheels of version 2.0.1.
1 parent 17bab85 commit 6a873ec

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Alternatively, one can install from source with the following shell commands:
169169
```shell
170170
$ git clone https://github.com/zoj613/polyagamma.git
171171
$ cd polyagamma/
172-
$ pip install cython==0.29.*
172+
$ pip install cython==3.0.*
173173
$ cythonize polyagamma/*.pyx
174174
$ pip install .
175175
```

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ requires = [
33
"wheel",
44
"setuptools>=61.0.0",
55
"setuptools-scm",
6-
"numpy==2.1.3; python_version>='3.10' and platform_python_implementation!='PyPy'",
6+
"numpy>=2.2.4; python_version>='3.10' and platform_python_implementation!='PyPy'",
77
# PyPy specific requirements
8-
"numpy==2.1.3; python_version=='3.10' and platform_python_implementation=='PyPy'",
8+
"numpy>=2.2.4; python_version=='3.10' and platform_python_implementation=='PyPy'",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -64,9 +64,8 @@ archs = ["auto64"]
6464
# We also skip musllinux wheels for the aarch64 architecture because building a wheel takes hours.
6565
skip = ["pp31*", "pp3*_aarch64", "*-musllinux_aarch64"]
6666
# The test-command string is not parsed correctly on windows so we skip testing the wheel for now.
67-
# ARM64 wheels on MacOS currently can't be test with cibuildwheels, so we skip testing until it can be supoorted.
68-
test-skip = ["*-win*", "*-macosx_arm64"]
69-
before-test = "pip install numpy --pre"
67+
test-skip = ["*-win*"]
68+
before-test = "pip install numpy"
7069
test-command = [
7170
"python -c 'from polyagamma import random_polyagamma;print(random_polyagamma());'"
7271
]
@@ -76,7 +75,10 @@ environment = { SETUPTOOLS_SCM_DEBUG = 1 }
7675
archs = ["x86_64", "aarch64"]
7776

7877
[tool.cibuildwheel.macos]
79-
archs = ["x86_64", "arm64"]
78+
# We skip building of ARM64 wheels because they can't be tested in the CI
79+
# and we follow recommendations of the cibuildwheel team by having users build
80+
# them natively at install time of this package via `pip install polyagamma`.
81+
archs = ["x86_64"]
8082

8183
[[tool.cibuildwheel.overrides]]
8284
# To avoid errors building numpy for the musllinux linux wheels, we install blas.

requirements-dev.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cython==3.0.11
2-
numpy==2.1.3
3-
pre-commit==4.0.1
4-
pytest==8.3.3
1+
cython==3.0.12
2+
numpy==2.2.4
3+
pre-commit==4.1.0
4+
pytest==8.3.5
55
pytest-cov==6.0.0
6-
setuptools==75.3.0
6+
setuptools==75.8.2

0 commit comments

Comments
 (0)