snowplow/snowplow-python-tracker

Update PyPI deployment to use Twine

Closed this issue · 0 comments

Since Twine is the newer and recommended way of uploading packages to PyPI, I've updated the deployment script to use Twine instead of executing setup.py. Here's some of the upsides from the Twine docs:

The biggest reason to use twine is that it securely authenticates you to PyPI over HTTPS using a verified connection regardless of the underlying Python version, while whether or not python setup.py upload will work correctly and securely depends on your build system, your Python version and the underlying operating system.

Secondly, it allows you to precreate your distribution files. python setup.py upload only allows you to upload something that you're building with distutils or setuptools, and created in the same command invocation. This means that you cannot test the exact file you're going to upload to PyPI to ensure that it works before uploading it.