Skip to content

BLD Uses cibuildwheel for linux + osx wheels [cd build] #20102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Nov 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "REV Revert libffi flag [cd build]"
This reverts commit 9b45d83.
  • Loading branch information
thomasjpfan committed Oct 12, 2021
commit c9abce565da5ca560607a2ca9a752b51fa068013
3 changes: 2 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
- os: ubuntu-latest
python: "310"
platform: manylinux_x86_64
install_libffi_devel: "1"

# macos builds
- os: macos-latest
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
CIBW_BEFORE_TEST: pip install -r {project}/test_requirements.txt
# Installs libffi so that cffi can be built from source when needed
CIBW_BEFORE_TEST_LINUX: >
yum install -y libffi-devel &&
[[ "${{ matrix.install_libffi_devel }}" == "1" ]] && yum install -y libffi-devel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we use libffi-devel for, just some optional tests or something more interesting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libffi-devel is used to build cffi from source if wheels do not exists. cffi is required by test_requirements here:

# for numpy.random.test.test_extending
cffi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be fine to make cffi a soft requirement: if it is unavailable we could skip that test. Is there a way to do that without too much hassle? The test takes the failed import into account

try:
import cffi
except ImportError:
cffi = None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated test_requirements.txt, to make cffi a soft requirement for python 3.10:

cffi; python_version < '3.10'

pip install -r {project}/test_requirements.txt
CIBW_TEST_COMMAND: bash {project}/tools/wheels/cibw_test_command.sh {project}

Expand Down