Skip to content

Instantly share code, notes, and snippets.

@neighthan
Last active February 16, 2019 19:03
Show Gist options
  • Save neighthan/4b2c3552e428230693884be4150e8a34 to your computer and use it in GitHub Desktop.
Save neighthan/4b2c3552e428230693884be4150e8a34 to your computer and use it in GitHub Desktop.
Build + upload a package to PyPI
# from https://packaging.python.org/tutorials/packaging-projects/
# make sure to start in the directory where your setup.py is located
pip install -U setuptools wheel twine
python setup.py sdist bdist_wheel
# test that things work first if needed
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
pip install --index-url https://test.pypi.org/simple/ <package-name>
twine upload dist/*
rm -rf build
rm -rf dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment