Skip to content

Instantly share code, notes, and snippets.

@DahlitzFlorian
Last active April 23, 2017 16:27
Show Gist options
  • Select an option

  • Save DahlitzFlorian/d307bd9c5c03e2954d32128ce50c1b96 to your computer and use it in GitHub Desktop.

Select an option

Save DahlitzFlorian/d307bd9c5c03e2954d32128ce50c1b96 to your computer and use it in GitHub Desktop.
Automates PyPI-publishing based on setup.py and user input while running file
@echo off
@RD /S /Q dist\
python setup.py sdist
python setup.py bdist_wheel
SET /P username=Enter PyPI username:
SET /P password=Enter PyPI password:
@echo [distutils] > .pypirc
@echo index-servers=pypi >> .pypirc
@echo [pypi] >> .pypirc
@echo repository = https://upload.pypi.org/legacy/ >> .pypirc
@echo username = %username% >> .pypirc
@echo password = %password% >> .pypirc
twine register dist/*.whl
twine upload --config-file .pypirc dist/*
DEL .pypirc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment