Repository navigation
Fix sdist packaging and modernize CI - #2
Merged
Merged
Conversation
The sdist only shipped the cythonized .c/.cpp files, so installing from it failed in cythonize() with "doesn't match any files" (#1). Include the .pyx sources and floyd_rivest_select.h.
Older Pythons keep the existing rc2 wheels; current build tooling (Cython 3, mypy, protobuf) no longer supports 3.7/3.8.
- Update all actions to current majors (artifact v3 actions were shut off in Jan 2025; macos-12 runners are retired) - Test Python 3.9-3.14, build cp39-cp314 wheels via cibuildwheel v4 - Skip free-threaded builds (unsupported by mypyc) and 3.15 until the toolchain supports it; keep PyPy wheels (opt-in since cibuildwheel 3) - Add aarch64 Linux wheels via the ubuntu-24.04-arm runner - Smoke-test installing from the sdist so missing sources fail CI (#1)
Replaces the PYPI_API_TOKEN secret with OIDC; the trusted publisher is configured on PyPI for this repo's actions.yml workflow.
Packaging: - Ship the complete test suite in sdists; tests/utils.py and tests/__init__.py were missing, so pytest failed from an unpacked sdist - Keep Cython sources, generated C/C++, and headers out of wheels and installed packages via exclude_package_data; they still ship in sdists - Skip mypyc on free-threaded CPython in setup.py, matching the cp31?t-* wheel skip - Drop redundant universal2 macOS wheels; pip always prefers the thin arm64/x86_64 wheels that are also built - Document 64-bit-only Windows wheels, PyPy 3.11-only wheels, and the Python dev-headers requirement for source builds in the README CI: - Build the sdist with the pinned Python; pipx ran build under the runner's system interpreter, bypassing the 3.14 pin - Install the sdist with its [test] extra instead of a hardcoded package list, assert type metadata lands in the installed package, and run pytest from the unpacked sdist instead of the checkout - Set overwrite: true on artifact uploads so job re-runs work with immutable v4+ artifacts - Download only the sdist and wheels-* artifacts in publish_pypi - Restrict push CI to main and cancel superseded pull request runs - Cross-reference the three places that must change together when Python 3.15 support lands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packaging
*.pyx,*.h) and the complete test suite in sdists, so the package can be built and tested from the tarball aloneexclude_package_data(they still ship in sdists)cp31?t-*wheel skipCI and publishing
pip install build && python -m build; pipx ran under the runner's system interpreter, bypassing the pin)[test]extra, assertpy.typed/__init__.pyiland in the installed package, and run pytest from the unpacked tarball so missing files can't slip through againsdistandwheels-*artifactsoverwrite: trueon artifact uploads so re-running a failed release run works with immutable v4+ artifactscp315-*skip)Verification
The new sdist job was rehearsed locally on Python 3.14.4: the sdist builds, passes
twine check, installs with all extensions compiling, ships only compiled modules plus type metadata, and its bundled test suite passes (10 tests, 280 subtests).Before the next release
Register a trusted publisher on PyPI for this project (owner
flatrtree, repoflatrtree-py, workflowactions.yml, environment left blank). The API-token fallback is gone, so an unregistered publisher only fails at release time.