I noticed installing pyminizip is impossible on minimal environments that lack build tools (i.e. python:slim, python:alpine containers).
Figured I'd open a PR to have wheels for this package, to make installation easier for users.
Advantages of shipping wheels
No build tools (i.e. gcc) are necessary for installation.
Installation is ~10x faster (~0.38s vs. ~3.7s in a container on my local machine).
Wheels are 5x smaller than sdists on Windows/macOS (only marginally smaller on Linux for some reason).
Wheel compatibility
Using cibuildwheel is super easy for build automation (Great simple template here) and it only takes a couple of minutes to run.
At least as a start I've set it to build Intel 64-bit CPython wheels, for 3.6-3.11 (all supported versions in cibuildwheel).
Added workflow also has a job for building a source distribution, to have everything needed for a PyPI release :)
Checking info on pypistats.org it seems like >99% of users are Linux Python 3.7+, so almost every user should benefit.
I kept the default manylinux2014 image, as pretty much every Python 3.7 user is compatible with it.
A small amount of users will still not get wheels because they have an old version of pip not supporting manylinux2014 (See stats here).
Anyway - any user with an unsupported platform/old pip will just fallback to the existing behavior and get the sdist.
It seems like 0.2.6 == master.
In case it's merged, it would be cool to have those wheels uploaded to PyPI for the current release, instead of waiting for a future release (unless one is planned soon).
I also removed upload.sh which shouldn't really be involved when sdist+wheels are created by CI.
Hey :)
I noticed installing
pyminizip
is impossible on minimal environments that lack build tools (i.e.python:slim
,python:alpine
containers). Figured I'd open a PR to have wheels for this package, to make installation easier for users.Advantages of shipping wheels
Wheel compatibility
Using
cibuildwheel
is super easy for build automation (Great simple template here) and it only takes a couple of minutes to run.At least as a start I've set it to build Intel 64-bit CPython wheels, for 3.6-3.11 (all supported versions in cibuildwheel). Added workflow also has a job for building a source distribution, to have everything needed for a PyPI release :)
Checking info on pypistats.org it seems like >99% of users are Linux Python 3.7+, so almost every user should benefit. I kept the default
manylinux2014
image, as pretty much every Python 3.7 user is compatible with it. A small amount of users will still not get wheels because they have an old version ofpip
not supportingmanylinux2014
(See stats here).Anyway - any user with an unsupported platform/old pip will just fallback to the existing behavior and get the
sdist
.List of build artifacts
Example build: https://github.com/ben9923/pyminizip/actions/runs/3170412445
Upload suggestion
It seems like
0.2.6 == master
. In case it's merged, it would be cool to have those wheels uploaded to PyPI for the current release, instead of waiting for a future release (unless one is planned soon).I also removed
upload.sh
which shouldn't really be involved when sdist+wheels are created by CI.Related to #11