aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-07-22 16:56:53 -0400
committerJason R. Coombs <jaraco@jaraco.com>2012-07-22 16:56:53 -0400
commit80d5fa167350f89a7bb6dcdf1521c51e5466851c (patch)
tree04dc253956e06cafc4d985511a8cb4db4201218c
parent4b2a1a13fd5e01804b4fb281aea59407ccde43e8 (diff)
downloadexternal_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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/release.py b/release.py
index 54a36175..9a1f0f3c 100644
--- a/release.py
+++ b/release.py
@@ -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