Skip to content

Commit 0532540

Browse files
committed
Trying to fix CI issues
- gcc 13.3.0 seems to have an issue with math.h on macOS. It spews a bunch of errors about the API_DEPRECATED macro not being used correctly, which is not an issue on our side. gcc 13.2.0 does not seem to have this issue, but since we cannot select gcc with such granularity we downgrade to gcc 12 and hope this fixes the issue for now. - numpy 2.0.0 has come out which causes runtime issues. Fortunately the fix is easy, just build with pybind11 >=2.12.0. However this is still an issue for the pdfo compatibility test since pdfo does not support numpy 2.0.0, and sometimes the tests install 2.0.0 because it happens to be in the pip cache. So we upgrade pybind11 (the new version is compatible with 2.0 and 1.0 numpy) and skip the pdfo test if we happened to pick up numpy 2. - macOS builds for building Python wheels started to complain when running the "delocate" step that libquadmath, libstdc++, and libgfortran have minimum targets of 11.0, whereas the default was 10.9, hence we added the relevant env variable for CIBW.
1 parent be6c3d0 commit 0532540

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.github/workflows/build_python.yml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
if: ${{ runner.os == 'macOS' }}
5252
with:
5353
compiler: gcc
54+
version: 12
5455

5556
# Copied from https://github.com/scipy/scipy/blob/main/.github/workflows/wheels.yml
5657
# For rtools, see https://github.com/r-windows/rtools-installer/releases, which has been

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ skip = [
5252
# As such we can compile but we cannot test, so we skip those.
5353
"cp31*-manylinux_i686",
5454
]
55+
56+
[tool.cibuildwheel.macos.environment]
57+
MACOSX_DEPLOYMENT_TARGET = "11"

python/pybind11

Submodule pybind11 updated 91 files

python/tests/test_compatibility_pdfo.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def test_pdfo():
2020
scipy = pytest.importorskip("scipy")
2121
if version.parse(scipy.__version__) < version.parse("1.11.0"):
2222
pytest.skip("scipy version too old for this test (its version of COBYLA does not accept bounds)")
23+
numpy = pytest.importorskip("numpy")
24+
if version.parse(numpy.__version__) >= version.parse("2.0.0"):
25+
pytest.skip("numpy version too new for this test (pdfo does not yet support numpy v2)")
2326

2427
from pdfo import pdfo
2528
from scipy.optimize import NonlinearConstraint as NLC, LinearConstraint as LC, Bounds

0 commit comments

Comments
 (0)