diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2012-07-22 16:56:53 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2012-07-22 16:56:53 -0400 |
commit | 80d5fa167350f89a7bb6dcdf1521c51e5466851c (patch) | |
tree | 04dc253956e06cafc4d985511a8cb4db4201218c | |
parent | 4b2a1a13fd5e01804b4fb281aea59407ccde43e8 (diff) | |
download | external_python_setuptools-0.6.28.tar.gz external_python_setuptools-0.6.28.tar.bz2 external_python_setuptools-0.6.28.zip |
Check that Sphinx is installed before proceeding0.6.28
--HG--
branch : distribute
extra : rebase_source : 369ae02ec1ac1825c2586d6f5efc59f37a58b3df
-rw-r--r-- | release.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -89,6 +89,9 @@ def bump_version(filename): def do_release(): assert all(map(os.path.exists, files_with_versions)), ( "Expected file(s) missing") + + assert has_sphinx(), "You must have Sphinx installed to release" + res = raw_input('Have you read through the SCM changelog and ' 'confirmed the changelog is current for releasing {VERSION}? ' .format(**globals())) @@ -131,6 +134,15 @@ def do_release(): add_milestone_and_version() +def has_sphinx(): + try: + devnull = open(os.path.devnull, 'wb') + subprocess.Popen(['sphinx-build', '--version'], stdout=devnull, + stderr=subprocess.STDOUT).wait() + except Exception: + return False + return True + def build_docs(): if not os.path.isdir('docs'): return |