diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-24 16:46:08 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-24 16:46:08 -0400 |
commit | 0496e68c19f392c9da7081935709c8f8f0f01605 (patch) | |
tree | 35c029fa632b24c7f6ac61c2196e6c29d4c199bc | |
parent | 6075a86ef9810670e9b89c9f4321aad19158fad0 (diff) | |
download | external_python_setuptools-0.7b2.tar.gz external_python_setuptools-0.7b2.tar.bz2 external_python_setuptools-0.7b2.zip |
Extract function for uploading to pypi0.7b2
-rw-r--r-- | release.py | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -132,21 +132,7 @@ def do_release(): subprocess.check_call(['hg', 'update', VERSION]) - linkify('CHANGES.txt', 'CHANGES (links).txt') - - has_docs = build_docs() - if os.path.isdir('./dist'): - shutil.rmtree('./dist') - cmd = [ - sys.executable, 'setup.py', '-q', - 'egg_info', '-RD', '-b', '', - 'sdist', - 'register', '-r', PACKAGE_INDEX, - 'upload', '-r', PACKAGE_INDEX, - ] - if has_docs: - cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) - subprocess.check_call(cmd) + upload_to_pypi() upload_bootstrap_script() # update to the tip for the next operation @@ -163,6 +149,23 @@ def do_release(): add_milestone_and_version() +def upload_to_pypi(): + linkify('CHANGES.txt', 'CHANGES (links).txt') + + has_docs = build_docs() + if os.path.isdir('./dist'): + shutil.rmtree('./dist') + cmd = [ + sys.executable, 'setup.py', '-q', + 'egg_info', '-RD', '-b', '', + 'sdist', + 'register', '-r', PACKAGE_INDEX, + 'upload', '-r', PACKAGE_INDEX, + ] + if has_docs: + cmd.extend(['upload_docs', '-r', PACKAGE_INDEX]) + subprocess.check_call(cmd) + def has_sphinx(): try: devnull = open(os.path.devnull, 'wb') |