Skip to content

Instantly share code, notes, and snippets.

@mkorkmaz
Last active February 21, 2017 13:56
Show Gist options
  • Save mkorkmaz/7b057a62a3437aea7d25aff26616b7ca to your computer and use it in GitHub Desktop.
Save mkorkmaz/7b057a62a3437aea7d25aff26616b7ca to your computer and use it in GitHub Desktop.
Submit your package to PyPI
# create ~/.pypirc if does not exist
touch ~/.pypirc
echo "[distutils]" >> ~/.pypirc
echo "index-servers=pypi" >> ~/.pypirc
echo "" >> ~/.pypirc
echo "[pypi]" >> ~/.pypirc
echo "repository: https://pypi.python.org/pypi" >> ~/.pypirc
echo "username = pypi_username" >> ~/.pypirc
echo "password = pypi_password" >> ~/.pypirc
# install twine if not installed
pip3 install twine
# go to project folder where setup.py exists
cd /path/to/setup.py/folder
# create dist files
python3 setup.py sdist bdist_wheel
# upload dist files to PyPI
twine upload --skip-existing dist/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment