summaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-03-31 08:27:33 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-03-31 08:27:33 -0400
commite8ca95c2e12f46e203715194e4729f8b33de2c23 (patch)
treed5dd61305d84bee93dcfa1a8d08d8d2e68337268 /docs/conf.py
parent332b586b7c65dee7e9a2dbbcbc1c896f4a862a3f (diff)
downloadpython-setuptools-git-e8ca95c2e12f46e203715194e4729f8b33de2c23.tar.gz
Constrain hack to the RTD environment. Rely on bootstrap routine to make dependencies available.
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 28f86da4..f7d02303 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,14 +18,17 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-
-# hack to run the bootstrap script so that jaraco.packaging.sphinx
-# can invoke setup.py
import subprocess
import sys
import os
-proj_root = os.path.join(os.path.dirname(__file__), os.path.pardir)
-subprocess.check_call([sys.executable, 'bootstrap.py'], cwd=proj_root)
+
+
+# hack to run the bootstrap script so that jaraco.packaging.sphinx
+# can invoke setup.py
+'READTHEDOCS' in os.environ and subprocess.check_call(
+ [sys.executable, 'bootstrap.py'],
+ cwd=os.path.join(os.path.dirname(__file__), os.path.pardir),
+)
# -- General configuration -----------------------------------------------------