Last active
February 21, 2017 13:56
-
-
Save mkorkmaz/7b057a62a3437aea7d25aff26616b7ca to your computer and use it in GitHub Desktop.
Submit your package to PyPI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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