Commit 0e4d202c by Tom Christie

Merge pull request #2527 from linovia/feature/secured_pypi_upload

Use twine to upload to pypi.
parents 24372ec7 750d0c9f
...@@ -19,6 +19,8 @@ django-oauth2-provider>=0.2.4 ...@@ -19,6 +19,8 @@ django-oauth2-provider>=0.2.4
# wheel for PyPI installs # wheel for PyPI installs
wheel==0.24.0 wheel==0.24.0
# twine for secured PyPI uploads
twine==1.4.0
# MkDocs for documentation previews/deploys # MkDocs for documentation previews/deploys
mkdocs==0.11.1 mkdocs==0.11.1
...@@ -48,8 +48,11 @@ if sys.argv[-1] == 'publish': ...@@ -48,8 +48,11 @@ if sys.argv[-1] == 'publish':
if os.system("pip freeze | grep wheel"): if os.system("pip freeze | grep wheel"):
print("wheel not installed.\nUse `pip install wheel`.\nExiting.") print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
sys.exit() sys.exit()
os.system("python setup.py sdist upload") if os.system("pip freeze | grep twine"):
os.system("python setup.py bdist_wheel upload") print("twine not installed.\nUse `pip install twine`.\nExiting.")
sys.exit()
os.system("python setup.py sdist bdist_wheel")
os.system("twine upload dist/*")
print("You probably want to also tag the version now:") print("You probably want to also tag the version now:")
print(" git tag -a %s -m 'version %s'" % (version, version)) print(" git tag -a %s -m 'version %s'" % (version, version))
print(" git push --tags") print(" git push --tags")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment