Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
757c157d
Commit
757c157d
authored
9 years ago
by
Nathaniel Manista
Browse files
Options
Downloads
Plain Diff
Merge pull request #5134 from soltanmm/cleaners
Clean-up Python linux-binary installation.
parents
d397b7a6
35afe4af
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/grpcio/commands.py
+23
-17
23 additions, 17 deletions
src/python/grpcio/commands.py
with
23 additions
and
17 deletions
src/python/grpcio/commands.py
+
23
−
17
View file @
757c157d
...
@@ -56,6 +56,9 @@ BINARIES_REPOSITORY = os.environ.get(
...
@@ -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,7 +138,7 @@ class Install(install.install, EggNameMixin):
...
@@ -135,7 +138,7 @@ 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
)
...
@@ -143,22 +146,25 @@ class Install(install.install, EggNameMixin):
...
@@ -143,22 +146,25 @@ class Install(install.install, EggNameMixin):
def
run
(
self
):
def
run
(
self
):
if
self
.
use_grpc_custom_bdist
:
if
self
.
use_grpc_custom_bdist
:
try
:
try
:
egg_path
=
_get_grpc_custom_bdist_egg
(
self
.
egg_name
(
True
),
try
:
self
.
egg_name
(
False
))
egg_path
=
_get_grpc_custom_bdist_egg
(
self
.
egg_name
(
True
),
except
CommandError
as
error
:
self
.
egg_name
(
False
))
sys
.
stderr
.
write
(
except
CommandError
as
error
:
'
\n
WARNING: Failed to acquire grpcio prebuilt binary:
\n
'
sys
.
stderr
.
write
(
'
{}.
\n\n
'
.
format
(
error
.
message
))
'
\n
WARNING: Failed to acquire grpcio prebuilt binary:
\n
'
raise
'
{}.
\n\n
'
.
format
(
error
.
message
))
try
:
raise
self
.
_run_bdist_retrieval_install
(
egg_path
)
try
:
except
Exception
as
error
:
self
.
_run_bdist_retrieval_install
(
egg_path
)
# if anything else happens (and given how there's no way to really know
except
Exception
as
error
:
# what's happening in setuptools here, I mean *anything*), warn the user
# if anything else happens (and given how there's no way to really know
# and fall back to building from source.
# what's happening in setuptools here, I mean *anything*), warn the user
sys
.
stderr
.
write
(
# and fall back to building from source.
'
{}
\n
WARNING: Failed to install grpcio prebuilt binary.
\n\n
'
sys
.
stderr
.
write
(
.
format
(
traceback
.
format_exc
()))
'
{}
\n
WARNING: Failed to install grpcio prebuilt binary.
\n\n
'
.
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment