From dd6ee7af7e67a7b0644f0c40468c88fef6eb2626 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 11 Feb 2016 20:08:49 -0800 Subject: [PATCH 1/3] Truncate Python target triple --- src/python/grpcio/commands.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index eb5cbb34f08..58af6bebf56 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -114,19 +114,17 @@ def _get_grpc_custom_bdist(decorated_basename, target_bdist_basename): class WheelNameMixin(object): """Mixin for setuptools.Command classes to enable acquiring the bdist name.""" - def wheel_name(self, with_custom): - """ - Args: - with_custom: Boolean describing whether or not to decorate the bdist name - with custom gRPC-specific target information. - """ + def wheel_custom_name(self): + base = self.wheel_name() + # Drop troublesome parts of the target tuple + base_split = base.split('-') + base = '-'.join(base_split[0:3] + base_split[4:]) + flavor = 'ucs2' if sys.maxunicode == 65535 else 'ucs4' + return '{base}-{flavor}'.format(base=base, flavor=flavor) + + def wheel_name(self): wheel_command = self.get_finalized_command('bdist_wheel') - base = wheel_command.get_archive_basename() - if with_custom: - flavor = 'ucs2' if sys.maxunicode == 65535 else 'ucs4' - return '{base}-{flavor}'.format(base=base, flavor=flavor) - else: - return base + return wheel_command.get_archive_basename() class Install(install.install, WheelNameMixin): @@ -155,8 +153,8 @@ class Install(install.install, WheelNameMixin): if self.use_grpc_custom_bdist: try: try: - bdist_path = _get_grpc_custom_bdist(self.wheel_name(True), - self.wheel_name(False)) + bdist_path = _get_grpc_custom_bdist(self.wheel_custom_name(), + self.wheel_name()) except CommandError as error: sys.stderr.write( '\nWARNING: Failed to acquire grpcio prebuilt binary:\n' @@ -200,7 +198,8 @@ class BdistWheelCustomName(bdist_wheel.bdist_wheel, WheelNameMixin): # 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))) + target = os.path.join( + self.dist_dir, '{}.whl'.format(self.wheel_custom_name())) shutil.move(output, target) From cd4358460d156b627f1fc47fe055ae80394eb9ce Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 11 Feb 2016 20:12:48 -0800 Subject: [PATCH 2/3] Bump Python version --- build.yaml | 1 + src/python/grpcio/grpc_version.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index 0aaef67cacb..e99c70619bc 100644 --- a/build.yaml +++ b/build.yaml @@ -7,6 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here + python_version: 0.13.0-pre2 ruby_version: 0.13.0-pre1.1 version: 0.13.0-pre1 filegroups: diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index b256871bd5e..c1cf33d1b11 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.13.0rc1' +VERSION='0.13.0rc2' From b14ea1de58b6ecc7105c59d84b6efd59bd2b89e0 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 11 Feb 2016 20:33:07 -0800 Subject: [PATCH 3/3] Revert Ruby version specialization --- build.yaml | 1 - src/ruby/lib/grpc/version.rb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.yaml b/build.yaml index e99c70619bc..707743557cd 100644 --- a/build.yaml +++ b/build.yaml @@ -8,7 +8,6 @@ settings: '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here python_version: 0.13.0-pre2 - ruby_version: 0.13.0-pre1.1 version: 0.13.0-pre1 filegroups: - name: census diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 992991d8e19..d7aa18be3e2 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0.pre1.1' + VERSION = '0.13.0.pre1' end