|
|
@ -56,6 +56,9 @@ BINARIES_REPOSITORY = os.environ.get( |
|
|
|
'GRPC_PYTHON_BINARIES_REPOSITORY', |
|
|
|
'GRPC_PYTHON_BINARIES_REPOSITORY', |
|
|
|
'https://storage.googleapis.com/grpc-precompiled-binaries/python') |
|
|
|
'https://storage.googleapis.com/grpc-precompiled-binaries/python') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USE_GRPC_CUSTOM_BDIST = bool(int(os.environ.get( |
|
|
|
|
|
|
|
'GRPC_PYTHON_USE_CUSTOM_BDIST', '1'))) |
|
|
|
|
|
|
|
|
|
|
|
CONF_PY_ADDENDUM = """ |
|
|
|
CONF_PY_ADDENDUM = """ |
|
|
|
extensions.append('sphinx.ext.napoleon') |
|
|
|
extensions.append('sphinx.ext.napoleon') |
|
|
|
napoleon_google_docstring = True |
|
|
|
napoleon_google_docstring = True |
|
|
@ -135,13 +138,14 @@ class Install(install.install, EggNameMixin): |
|
|
|
|
|
|
|
|
|
|
|
def initialize_options(self): |
|
|
|
def initialize_options(self): |
|
|
|
install.install.initialize_options(self) |
|
|
|
install.install.initialize_options(self) |
|
|
|
self.use_grpc_custom_bdist = bool(int(os.environ.get('GRPC_PYTHON_USE_CUSTOM_BDIST', '1'))) |
|
|
|
self.use_grpc_custom_bdist = USE_GRPC_CUSTOM_BDIST |
|
|
|
|
|
|
|
|
|
|
|
def finalize_options(self): |
|
|
|
def finalize_options(self): |
|
|
|
install.install.finalize_options(self) |
|
|
|
install.install.finalize_options(self) |
|
|
|
|
|
|
|
|
|
|
|
def run(self): |
|
|
|
def run(self): |
|
|
|
if self.use_grpc_custom_bdist: |
|
|
|
if self.use_grpc_custom_bdist: |
|
|
|
|
|
|
|
try: |
|
|
|
try: |
|
|
|
try: |
|
|
|
egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True), |
|
|
|
egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True), |
|
|
|
self.egg_name(False)) |
|
|
|
self.egg_name(False)) |
|
|
@ -159,6 +163,8 @@ class Install(install.install, EggNameMixin): |
|
|
|
sys.stderr.write( |
|
|
|
sys.stderr.write( |
|
|
|
'{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n' |
|
|
|
'{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n' |
|
|
|
.format(traceback.format_exc())) |
|
|
|
.format(traceback.format_exc())) |
|
|
|
|
|
|
|
raise |
|
|
|
|
|
|
|
except Exception: |
|
|
|
install.install.run(self) |
|
|
|
install.install.run(self) |
|
|
|
else: |
|
|
|
else: |
|
|
|
install.install.run(self) |
|
|
|
install.install.run(self) |
|
|
|