Skip to content

Commit

Permalink
Trying to fix CI issues
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
nbelakovski committed Jun 16, 2024
1 parent be6c3d0 commit 0532540
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
if: ${{ runner.os == 'macOS' }}
with:
compiler: gcc
version: 12

# Copied from https://github.com/scipy/scipy/blob/main/.github/workflows/wheels.yml
# For rtools, see https://github.com/r-windows/rtools-installer/releases, which has been
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ skip = [
# As such we can compile but we cannot test, so we skip those.
"cp31*-manylinux_i686",
]

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "11"
2 changes: 1 addition & 1 deletion python/pybind11
Submodule pybind11 updated 91 files
+1 −1 .github/CONTRIBUTING.md
+9 −1 .github/dependabot.yml
+111 −74 .github/workflows/ci.yml
+3 −3 .github/workflows/configure.yml
+4 −4 .github/workflows/format.yml
+1 −1 .github/workflows/labeler.yml
+8 −8 .github/workflows/pip.yml
+7 −7 .github/workflows/upstream.yml
+21 −19 .pre-commit-config.yaml
+19 −2 .readthedocs.yml
+57 −6 CMakeLists.txt
+5 −4 README.rst
+1 −1 docs/advanced/embedding.rst
+11 −11 docs/advanced/exceptions.rst
+1 −1 docs/advanced/functions.rst
+29 −0 docs/advanced/misc.rst
+1 −1 docs/benchmark.py
+182 −2 docs/changelog.rst
+12 −4 docs/compiling.rst
+86 −42 docs/release.rst
+28 −0 docs/upgrade.rst
+142 −9 include/pybind11/cast.h
+18 −13 include/pybind11/detail/class.h
+16 −4 include/pybind11/detail/common.h
+1 −1 include/pybind11/detail/init.h
+16 −5 include/pybind11/detail/internals.h
+51 −10 include/pybind11/detail/type_caster_base.h
+3 −2 include/pybind11/eigen/tensor.h
+2 −1 include/pybind11/functional.h
+9 −1 include/pybind11/gil.h
+91 −0 include/pybind11/gil_safe_call_once.h
+157 −22 include/pybind11/numpy.h
+121 −48 include/pybind11/pybind11.h
+22 −5 include/pybind11/pytypes.h
+8 −7 include/pybind11/stl.h
+28 −56 include/pybind11/stl_bind.h
+125 −0 include/pybind11/typing.h
+1 −1 noxfile.py
+1 −1 pybind11/_version.py
+3 −1 pybind11/setup_helpers.py
+8 −11 pyproject.toml
+9 −4 tests/CMakeLists.txt
+1 −0 tests/conftest.py
+2 −2 tests/cross_module_interleaved_error_already_set.cpp
+2 −0 tests/extra_python_package/test_files.py
+4 −4 tests/pybind11_cross_module_tests.cpp
+9 −3 tests/pybind11_tests.cpp
+14 −8 tests/requirements.txt
+7 −0 tests/test_buffers.py
+2 −2 tests/test_builtin_casters.py
+7 −0 tests/test_callbacks.py
+14 −0 tests/test_class.py
+1 −2 tests/test_cmake_build/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_embed/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_function/CMakeLists.txt
+3 −3 tests/test_cmake_build/installed_target/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_embed/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_function/CMakeLists.txt
+9 −3 tests/test_cmake_build/subdirectory_target/CMakeLists.txt
+4 −0 tests/test_constants_and_functions.cpp
+12 −0 tests/test_custom_type_casters.cpp
+17 −0 tests/test_eigen_matrix.cpp
+8 −1 tests/test_eigen_matrix.py
+6 −3 tests/test_enum.py
+54 −13 tests/test_exceptions.cpp
+1 −1 tests/test_exceptions.h
+21 −2 tests/test_exceptions.py
+2 −2 tests/test_factory_constructors.py
+46 −0 tests/test_kwargs_and_defaults.cpp
+37 −1 tests/test_kwargs_and_defaults.py
+19 −15 tests/test_methods_and_attributes.py
+9 −3 tests/test_numpy_array.py
+29 −4 tests/test_numpy_dtypes.cpp
+11 −3 tests/test_numpy_dtypes.py
+45 −0 tests/test_python_multiple_inheritance.cpp
+35 −0 tests/test_python_multiple_inheritance.py
+26 −3 tests/test_pytypes.cpp
+57 −1 tests/test_pytypes.py
+19 −0 tests/test_sequences_and_iterators.cpp
+13 −0 tests/test_sequences_and_iterators.py
+15 −12 tests/test_smart_ptr.cpp
+12 −12 tests/test_stl.py
+80 −0 tests/test_stl_binders.cpp
+44 −6 tests/test_stl_binders.py
+2 −2 tests/test_type_caster_pyobject_ptr.cpp
+24 −1 tools/FindPythonLibsNew.cmake
+29 −1 tools/make_changelog.py
+30 −16 tools/pybind11Common.cmake
+1 −1 tools/pybind11Config.cmake.in
+77 −22 tools/pybind11NewTools.cmake
+13 −7 tools/pybind11Tools.cmake
3 changes: 3 additions & 0 deletions python/tests/test_compatibility_pdfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def test_pdfo():
scipy = pytest.importorskip("scipy")
if version.parse(scipy.__version__) < version.parse("1.11.0"):
pytest.skip("scipy version too old for this test (its version of COBYLA does not accept bounds)")
numpy = pytest.importorskip("numpy")
if version.parse(numpy.__version__) >= version.parse("2.0.0"):
pytest.skip("numpy version too new for this test (pdfo does not yet support numpy v2)")

from pdfo import pdfo
from scipy.optimize import NonlinearConstraint as NLC, LinearConstraint as LC, Bounds
Expand Down

0 comments on commit 0532540

Please sign in to comment.