aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <atash@google.com>2016-10-25 15:57:48 -0700
committerGravatar Masood Malekghassemi <atash@google.com>2016-10-25 18:06:18 -0700
commit2da4666bdd0a1da32521ef86c23b20c3b2608954 (patch)
tree9287fab5fbf5c9bef716322fbbf3e93ca40ee59f
parentc5fc0433e0ef1e2000dca4e73286d9f2935579c4 (diff)
Don't set up Python doc packages every time
-rw-r--r--setup.py8
-rwxr-xr-xtools/distrib/python/docgen.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 7a65698cbb..cdd3bb3f0d 100644
--- a/setup.py
+++ b/setup.py
@@ -79,6 +79,11 @@ BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False)
ENABLE_CYTHON_TRACING = os.environ.get(
'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False)
+# Environment variable specifying whether or not there's interest in setting up
+# documentation building.
+ENABLE_DOCUMENTATION_BUILD = os.environ.get(
+ 'GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD', False)
+
# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are
# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support.
# We use these environment variables to thus get around that without locking
@@ -210,7 +215,8 @@ SETUP_REQUIRES = INSTALL_REQUIRES + (
'sphinx>=1.3',
'sphinx_rtd_theme>=0.1.8',
'six>=1.10',
-)
+ ) if ENABLE_DOCUMENTATION_BUILD else ()
+
if BUILD_WITH_CYTHON:
sys.stderr.write(
"You requested a Cython build via GRPC_PYTHON_BUILD_WITH_CYTHON, "
diff --git a/tools/distrib/python/docgen.py b/tools/distrib/python/docgen.py
index 15bd8d855f..622317920d 100755
--- a/tools/distrib/python/docgen.py
+++ b/tools/distrib/python/docgen.py
@@ -67,6 +67,7 @@ environment.update({
'LDFLAGS': '-L{}'.format(LIBRARY_PATH),
'LD_LIBRARY_PATH': LIBRARY_PATH,
'GRPC_PYTHON_BUILD_WITH_CYTHON': '1',
+ 'GRPC_PYTHON_ENABLE_DOCUMENTATION_BUILD': '1',
})
subprocess_arguments_list = [