aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2016-02-11 14:42:33 -0800
committerGravatar Masood Malekghassemi <soltanmm@users.noreply.github.com>2016-02-11 14:42:33 -0800
commit5d0cce34feabc73cd1af622d846f707f2aecee90 (patch)
tree4fab37fca3beb39f4161db1a9f07b2876b9d1633
parent05632298196e612bbdcc3d0c035df39ca086ef26 (diff)
parentb6d3a8238d58730472a14524ecd06ad94550a48b (diff)
Merge pull request #5207 from soltanmm/hack
Paper over custom command limitations
-rw-r--r--src/python/grpcio/commands.py10
-rwxr-xr-xtools/run_tests/build_artifact_python.sh8
2 files changed, 17 insertions, 1 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 1561bbf05e..eb5cbb34f0 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -187,7 +187,17 @@ class Install(install.install, WheelNameMixin):
class BdistWheelCustomName(bdist_wheel.bdist_wheel, WheelNameMixin):
"""Thin wrapper around the bdist command to build with our custom name."""
+ description = ("Create a gRPC custom-named wheel distribution. "
+ "Cannot be run with any other distribution-related command.")
+
def run(self):
+ # TODO(atash): if the hack we use to support Linux binaries becomes
+ # 'supported' (i.e.
+ # https://bitbucket.org/pypa/pypi/issues/120/binary-wheels-for-linux-are-not-supported
+ # is not solved and we see users beginning to use this command, ill-advised
+ # as that may be) consider making the following capable of running with
+ # other distribution-related commands. Currently it depends on the (AFAIK
+ # undocumented, private) ordering of the distribution files.
bdist_wheel.bdist_wheel.run(self)
output = self.distribution.dist_files[-1][2]
target = os.path.join(self.dist_dir, '{}.whl'.format(self.wheel_name(True)))
diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh
index f22ddd9185..f2c10aba7b 100755
--- a/tools/run_tests/build_artifact_python.sh
+++ b/tools/run_tests/build_artifact_python.sh
@@ -43,7 +43,13 @@ GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
${SETARCH_CMD} python setup.py \
bdist_wheel \
- sdist \
+ sdist
+
+# The bdist_wheel_grpc_custom command is finicky about command output ordering
+# and thus ought to be run in a shell command separate of others.
+GRPC_PYTHON_USE_CUSTOM_BDIST=0 \
+GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
+${SETARCH_CMD} python setup.py \
bdist_wheel_grpc_custom
mkdir -p artifacts