Skip to content

Conversation

zbowling
Copy link
Contributor

@zbowling zbowling commented Dec 18, 2024

Modernize setuptools by moving config/cython config to project.toml.

Create a github action CI job that wraps cibuildwheel to generate binary wheels for multiple python versions and architectures.

Uses pypa/gh-action-pypi-publish to publish binary wheels directly to pypi.

Drops support for python 3.7 and 3.8 and because they don't build with the same modern setuptools that support 3.13 anymore.

Increment version number.

@zbowling zbowling force-pushed the modernize-build-dist branch from 8147839 to b5992b7 Compare December 18, 2024 17:10
@zbowling
Copy link
Contributor Author

zbowling commented Dec 18, 2024

@alex-petrenko Please take a look! We use your dependency at @modularml in some public projects, but some folks are hitting issues with not having a sane C++ toolchain installed on their distros and running into compile issues that are hard to help folks debug so I figured it was easier to contribute upstream a CI build job to upload binary wheels to pypi for you.

I'm did some modernizing a bit of setuptools and other minor changes (this did mean dropping support for obsolete versions of Python, specifically 3.7 and 3.8).

The cibuildwheel will build for macOS (intel and ARM) and linux (on a half dozen architectures, cross compiled in qemu manylinux base images to ensure binary portability), and it will build wheels against CPython versions 3.9 to 3.13 (I'm skipping PyPy because of bugs in setuptools).

You can see how this runs on my fork: https://github.com/zbowling/faster-fifo/actions/runs/12397980265/job/34609622247#step:3:1738

This also uses the new pypi publication system so you don't have use tokens/user+passwords to upload to pypi if you link the github to pypi.

This will automatically kick off a publication and release build when you create a release with github's release UI (https://github.com/alex-petrenko/faster-fifo/releases) but I can also switch to doing a release when you a version on the repo instead if you prefer.

Copy link
Owner

@alex-petrenko alex-petrenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks very good, let's wing it 🚀

@alex-petrenko alex-petrenko merged commit 1a837fc into alex-petrenko:master Dec 28, 2024
15 checks passed
@alex-petrenko
Copy link
Owner

@zbowling love what you guys are doing BTW!
I really hope we'll write code in Mojo instead of Python soon!

@zbowling
Copy link
Contributor Author

zbowling commented Jan 8, 2025

Thanks a bunch! The new build published actually sped up our CI times since we don't need to fetch a bunch of extra packages to compile now. It also help some of the support issues with people that just have broken compilers/toolchains on their system like outdated versions of Xcode because they're just pure Python devs 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants