Skip to content

Commit

Permalink
Switch extension building to setuptools (#23)
Browse files Browse the repository at this point in the history
This was never an officially supported poetry use-case, even though it
was nice to have consistent locking.

Other more modern/nicer solutions don't seem to handle extensions
without added complication (e.g. hatchling is nice, but unless you
already use cmake or cython only, this seems to fall between the gaps a
little), so just use plain setuptools.
  • Loading branch information
ndevenish authored Jan 10, 2025
1 parent feef3ff commit 3eea0f7
Show file tree
Hide file tree
Showing 18 changed files with 5,867 additions and 6,116 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Apply patches
run: cat $(ls patches/*.patch | sort) | patch -p1 -N
- name: Build sdist
run: pipx run poetry build -f sdist
run: pip3 install build && python3 -m build -s .

- uses: actions/upload-artifact@v4
with:
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15, windows-2019]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/download-artifact@v4
Expand All @@ -47,16 +47,16 @@ jobs:
- name: Decompress sdist
if: "! startsWith(matrix.os, 'windows-')"
run: tar --strip-components=1 -xf dist/*.tar.gz

- name: Build wheel
uses: joerick/cibuildwheel@v1.11.0
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_SKIP: cp2* cp35* pp*
CIBW_SKIP: cp36* cp37* pp* cp313* *musllinux*
CIBW_TEST_COMMAND: pytest --regression {package}/tests
CIBW_BEFORE_TEST: pip install pytest dials-data

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

upload_pypi:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
setup.py
.vscode/

# Byte-compiled / optimized / DLL files
Expand Down
8 changes: 8 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include cbflib/src/*.c
include cbflib/include/*.h
include pycbf_wrap.c
include src/**/*.pyx
include src/**/*.pxd
include src/**/*.pyi


78 changes: 0 additions & 78 deletions build_multiple_wheels.sh

This file was deleted.

1 change: 1 addition & 0 deletions newsfragments/23.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to setuptools extension building.
Loading

0 comments on commit 3eea0f7

Please sign in to comment.