Skip to content

Commit

Permalink
Switch to cibuildwheel for the platform wheel building.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjankowsk committed Aug 5, 2023
1 parent 1b5a483 commit 38e2d14
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ on:

jobs:
Build-Wheels:
runs-on: ubuntu-latest
name: Build wheels on ${{ matrix.buildplat[0] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
# ensure that wheel builders fail independently
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
buildplat:
- [ubuntu-20.04, manylinux_x86_64]
- [ubuntu-20.04, musllinux_x86_64]
# python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python: ["cp37", "cp38", "cp39", "cp310", "cp311"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build setuptools wheel
python -m pip install git+https://bitbucket.org/vmorello/mtcutils.git@master
make install

- name: Build wheels
run: python -m build --wheel --outdir dist
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}

- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: ./dist/
path: ./wheelhouse/*.whl
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools", "wheel", "Cython >= 3.0.0"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
build-frontend = "build"
before-build = "pip install git+https://bitbucket.org/vmorello/mtcutils.git@master"
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ def get_long_description():
],
},
extras_require={
"develop": ["black", "Cython >= 3.0.0", "pytest", "pytest-cov", "twine"],
"develop": [
"black",
"cibuildwheel",
"Cython >= 3.0.0",
"pytest",
"pytest-cov",
"twine",
],
},
ext_modules=[
Extension(
Expand Down

0 comments on commit 38e2d14

Please sign in to comment.