Skip to content

Commit

Permalink
Merge pull request #1190 from robotology/fix-pypi-wheels-with-numpy-2.0
Browse files Browse the repository at this point in the history
Force installing NumPy 2.0 in CI/CD when building PyPI wheels and drop Python 3.7 and 3.8 in pip packages
  • Loading branch information
traversaro authored Jun 17, 2024
2 parents afab563 + 0d3cd9a commit 94ee23e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,16 @@ jobs:
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: cp37-*manylinux*_x86_64 cp38-*manylinux*_x86_64 cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64 cp311-*manylinux*_x86_64 cp312-*manylinux*_x86_64
CIBW_BUILD: cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64 cp311-*manylinux*_x86_64 cp312-*manylinux*_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_ENVIRONMENT_LINUX: AUDITWHEEL_PLAT=manylinux_2_28_x86_64
CIBW_BEFORE_BUILD_LINUX: |
# workaround for https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux &&\
dnf update -y &&\
dnf install -y eigen3-devel libxml2-devel
# Pre-install NumPy > 2.0
pip install "numpy>=2.0.0"
CIBW_TEST_COMMAND: "python -c 'import idyntree.bindings'"

- uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ swig_add_library(${target_name}
OUTFILE_DIR ${CMAKE_CURRENT_BINARY_DIR}
OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/idyntree)

message(STATUS "Linking SWIG Python bindings against NumPy '${Python3_NumPy_VERSION}'")
target_link_libraries(${target_name} PUBLIC Python3::NumPy)

set_target_properties(${target_name} PROPERTIES
Expand Down

0 comments on commit 94ee23e

Please sign in to comment.