How to automatically sign your Python wheel packages on macOS
Published on January 23, 2017
You can automatically sign your Python wheel packages before submitting them to PyPi.
In order to do this, you will first need to install wheel:
$ sudo pip install wheel
After that, generate a key:
$ wheel keygen
Now, to manually sign a package, type:
$ wheel sign dist/package-name-and-version.whl
You can also check the signature by executing:
$ wheel verify dist/package-name-and-version.whl
You can also sign the packages automatically upon execution of python setup.py bdist_wheel
.
In order to do this, edit your ~/.bash_profile
file and add the following line:
export WHEEL_TOOL=/usr/local/bin/wheel
You can then reload your configuration with source ~/.bash_profile
and you're ready to go.
Happy wheeling!