From 75ff754517c30df043de906b0a6fb0e1777570b7 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 6 Feb 2015 10:12:57 +0100 Subject: [PATCH 1/4] Use twine to upload to pypi. --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index efe39d8d4..391987bc9 100755 --- a/setup.py +++ b/setup.py @@ -48,8 +48,11 @@ if sys.argv[-1] == 'publish': if os.system("pip freeze | grep wheel"): print("wheel not installed.\nUse `pip install wheel`.\nExiting.") sys.exit() - os.system("python setup.py sdist upload") - os.system("python setup.py bdist_wheel upload") + if os.system("pip freeze | grep twine") + 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(" git tag -a %s -m 'version %s'" % (version, version)) print(" git push --tags") From 9dd97a0ee515089a1f818007f23460cf83159e71 Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 6 Feb 2015 10:23:58 +0100 Subject: [PATCH 2/4] Fixed a typo. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 391987bc9..4cdcfa86e 100755 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ if sys.argv[-1] == 'publish': if os.system("pip freeze | grep wheel"): print("wheel not installed.\nUse `pip install wheel`.\nExiting.") sys.exit() - if os.system("pip freeze | grep twine") + if os.system("pip freeze | grep twine"): print("twine not installed.\nUse `pip install twine`.\nExiting.") sys.exit() os.system("python setup.py sdist bdist_wheel") From 238a3b507baa4543e3bae82a6fc9d88a0aadc5ea Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 6 Feb 2015 13:50:40 +0100 Subject: [PATCH 3/4] Add Twine to the requirements. --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 00d973cdf..e5f555f5e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,7 @@ django-oauth2-provider>=0.2.4 # wheel for PyPI installs wheel==0.24.0 +twine==1.4.0 # MkDocs for documentation previews/deploys mkdocs==0.11.1 From 750d0c9f2b994af2ba92d2d470bbe079f9d9847c Mon Sep 17 00:00:00 2001 From: Xavier Ordoquy Date: Fri, 6 Feb 2015 13:57:08 +0100 Subject: [PATCH 4/4] Add Twine to the requirements. --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index e5f555f5e..32938ab23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,7 @@ django-oauth2-provider>=0.2.4 # wheel for PyPI installs wheel==0.24.0 +# twine for secured PyPI uploads twine==1.4.0 # MkDocs for documentation previews/deploys