Commit 783e07a8 by Chris Jerdonek

Added user confirmation to publish script.

parent 07dcd487
......@@ -114,6 +114,11 @@ def publish():
Publish this package to PyPI (aka "the Cheeseshop").
"""
answer = raw_input("Are you sure (yes/no)?")
if answer != "yes":
exit("Aborted: nothing published")
os.system('python setup.py sdist upload')
......@@ -132,10 +137,6 @@ License
return '\n\n'.join(sections)
if sys.argv[-1] == 'publish':
publish()
sys.exit()
# We follow the guidance here for compatibility with using setuptools instead
# of Distribute under Python 2 (on the subject of new, unrecognized keyword
# arguments to setup()):
......@@ -182,6 +183,10 @@ PACKAGES = [
def main(sys_argv):
if sys.argv[-1] == 'publish':
publish()
sys.exit()
long_description = make_long_description()
template_files = ['*.mustache', '*.txt']
......
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