aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <atash@google.com>2016-02-04 11:34:53 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2016-02-04 14:21:09 -0800
commitf751b0b549ac46b7856c72e97343f4c0fa0742aa (patch)
tree58e44e70738b51255d57473e6275e1212f518fcc /src/python/grpcio
parente4fdcd924263edca885b22122e9e7cf148c236fd (diff)
Use envvar for binary repository
Diffstat (limited to 'src/python/grpcio')
-rw-r--r--src/python/grpcio/commands.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 27e95609d6..490d0f07b3 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -52,6 +52,10 @@ import support
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
+BINARIES_REPOSITORY = os.environ.get(
+ 'GRPC_PYTHON_BINARIES_REPOSITORY',
+ 'https://storage.googleapis.com/grpc-precompiled-binaries/python/')
+
CONF_PY_ADDENDUM = """
extensions.append('sphinx.ext.napoleon')
napoleon_google_docstring = True
@@ -78,10 +82,7 @@ def _get_grpc_custom_bdist_egg(decorated_basename, target_egg_basename):
from six.moves.urllib import request
decorated_path = decorated_basename + '.egg'
try:
- url = (
- 'https://storage.googleapis.com/grpc-precompiled-binaries/'
- 'python/{target}'
- .format(target=decorated_path))
+ url = BINARIES_REPOSITORY + '/{target}'.format(target=decorated_path)
egg_data = request.urlopen(url).read()
except IOError as error:
raise CommandError(