Skip to content

PYTHON-4079 Generate ManyLinux2014 and ManyLinux1 Wheels #1454

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 10 commits into from
Dec 13, 2023
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
51 changes: 49 additions & 2 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
platforms: all

- name: Install cibuildwheel
# Note: the default manylinux is manylinux2014
run: python -m pip install "cibuildwheel>=2.4,<3"

- name: Build MacOS Py37 Wheel
Expand All @@ -75,7 +76,7 @@ jobs:
CIBW_TEST_COMMAND: "python {project}/tools/fail_if_no_c.py"
run: python -m cibuildwheel --output-dir wheelhouse

- name: Build wheels
- name: Build wheel
if: ${{ matrix.python != 'cp37' || matrix.buildplat[0] != 'macos-11' }}
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
Expand All @@ -87,6 +88,52 @@ jobs:
path: ./wheelhouse/*.whl
if-no-files-found: error

build_manylinux1_wheels:
runs-on: ubuntu-latest
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python: ["cp37", "cp38", "cp39"]
steps:
- name: Checkout pymongo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up python version
run: |
export PYTHON_VERSION=$(sed 's/^cp3/3./' <<< ${{ matrix.python }} )
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV

- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
allow-prereleases: true

- name: Install cibuildwheel
run: python -m pip install "cibuildwheel>=2.4,<3"

- name: Build manylinux_x86_64
env:
CIBW_BUILD: ${{ matrix.python }}-manylinux_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
run: python -m cibuildwheel --output-dir wheelhouse

- name: Build manylinux_i686
env:
CIBW_BUILD: ${{ matrix.python }}-manylinux_i686
CIBW_MANYLINUX_I686_IMAGE: manylinux1
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v3
with:
name: wheel-${{ matrix.python }}-manylinux1
path: ./wheelhouse/*.whl
if-no-files-found: error

make_sdist:
name: Make SDist
runs-on: macos-latest
Expand Down Expand Up @@ -119,7 +166,7 @@ jobs:

collect_dist:
runs-on: ubuntu-latest
needs: [build_wheels, make_sdist]
needs: [build_wheels, build_manylinux1_wheels, make_sdist]
name: Download Wheels
steps:
- name: Download all workflow run artifacts
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ test-command = "python {project}/tools/fail_if_no_c.py"

[tool.cibuildwheel.linux]
archs = "x86_64 aarch64 ppc64le s390x i686"
manylinux-x86_64-image = "manylinux_2_28"

[tool.cibuildwheel.macos]
archs = "universal2"
Expand Down