From e36ba9c46e266b3d9b9abb8f12cbf74cc67d84c1 Mon Sep 17 00:00:00 2001 From: Ryan P Kilby Date: Mon, 1 Jul 2019 00:19:12 -0700 Subject: [PATCH] Add `twine check` to publish process (#6770) --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 6c0d64239..ebe31ed2c 100755 --- a/setup.py +++ b/setup.py @@ -56,6 +56,10 @@ if sys.argv[-1] == 'publish': print("twine not installed.\nUse `pip install twine`.\nExiting.") sys.exit() os.system("python setup.py sdist bdist_wheel") + if os.system("twine check dist/*"): + print("twine check failed. Packages might be outdated.") + print("Try using `pip install -U twine wheel`.\nExiting.") + sys.exit() 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))