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.
This PR adds a workflow to build and test wheels using cibuildwheel, which makes the process way easier. It replaces #65.
setup.py
to use setuptools since distutils is deprecatedMANIFEST.in
and add the lzo source code to the sdistpyproject.toml
While testing I encountered this error for the Linux wheels because they're built on CentOS 7 which is still on lzo 2.06. For this reason I had to change
setup.py
so that it uses the included source files instead. This is also applied to Windows and macOS meaning it should be easier to build wheels on any platform (as long as build tools are present) because the need for external dependencies is removed. It also avoids the aforementioned issue by not relying on system-provided packages that may be of a different version.This means that these aren't really bindings anymore since the wheels are completely standalone but they're still very small in size and I think the benefits of this approach are worth it.
We could still add an option for Linux and macOS that allows builds to be made with the headers and library files that come from package managers, for users who might want to have a linked library.
Wheels are automatically uploaded when a tag is pushed. For now they are published on TestPyPI. If you want to target the real PyPI, delete the
repository-url
line. You'll have to set up trusted publishing and add an environment calledrelease
(or you can rename it). This is an easy process that results in better security for the releases.Closes #22, closes #23, closes #26, closes #48, closes #59, and closes #74 (and I think you forgot to close #54).