From f751b0b549ac46b7856c72e97343f4c0fa0742aa Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 4 Feb 2016 11:34:53 -0800 Subject: Use envvar for binary repository --- src/python/grpcio/commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/python/grpcio/commands.py') 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( -- cgit v1.2.3