Skip to content

REF: Refactor cibuildwheel logic into pyproject.toml #48945

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 1 commit into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 2 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
# TODO: support PyPy?
python: [["cp38", "3.8"], ["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11-dev"]]# "pp38", "pp39"]
env:
IS_32_BIT: ${{ matrix.buildplat[1] == 'win32' }}
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
steps:
Expand All @@ -72,15 +71,6 @@ jobs:
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
CIBW_ENVIRONMENT: IS_32_BIT='${{ env.IS_32_BIT }}'
# We can't test directly with cibuildwheel, since we need to have to wheel location
# to mount into the docker image
CIBW_TEST_COMMAND_LINUX: "python {project}/ci/test_wheels.py"
CIBW_TEST_COMMAND_MACOS: "python {project}/ci/test_wheels.py"
CIBW_TEST_REQUIRES: hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-asyncio>=0.17
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "python ci/fix_wheels.py {wheel} {dest_dir}"
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_BUILD_VERBOSITY: 3

# Used to test the built wheels
- uses: actions/setup-python@v3
Expand Down Expand Up @@ -118,7 +108,7 @@ jobs:

- name: Upload wheels
if: success()
shell: bash
shell: bash -el {0}
env:
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
Expand Down Expand Up @@ -195,7 +185,7 @@ jobs:

- name: Upload sdist
if: success()
shell: bash
shell: bash -el {0}
env:
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
PANDAS_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
Expand Down
24 changes: 24 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@ requires = [
# https://github.com/python-versioneer/python-versioneer/issues/193
# build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
skip = "cp36-* cp37-* pp37-* *-manylinux_i686 *_ppc64le *_s390x *-musllinux*"
build-verbosity = "3"
test-requires = "hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-asyncio>=0.17"
test-command = "python {project}/ci/test_wheels.py"

[tool.cibuildwheel.macos]
archs = "x86_64 universal2"
test-skip = "*_arm64 *_universal2:arm64"

[tool.cibuildwheel.windows]
repair-wheel-command = "python ci/fix_wheels.py {wheel} {dest_dir}"

[[tool.cibuildwheel.overrides]]
select = "*-win*"
# We test separately for Windows, since we use
# the base windows docker image to check if any dlls are
# missing from the wheel
test-command = ""

[[tool.cibuildwheel.overrides]]
select = "*-win32"
environment = { IS_32_BIT="true" }

[tool.black]
target-version = ['py38', 'py39']
exclude = '''
Expand Down