From e528577f11e15f7c8aab39201555b6eeb5410020 Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Mon, 8 Jan 2018 21:14:57 -0330 Subject: [PATCH] tools/release-packages: Generate Python3 dist for zulip_bots. Now that zulip_bots is fully Python3, it makes sense to only generate a Python3 wheel dist for it. zulip and zulip_botserver are still distributed as a py2/py3 universal wheel. --- tools/release-packages | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/release-packages b/tools/release-packages index ec52d12..67503ea 100755 --- a/tools/release-packages +++ b/tools/release-packages @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from __future__ import print_function from contextlib import contextmanager @@ -41,9 +41,13 @@ def _generate_dist(dist_type, setup_file, package_name, setup_args): ) print(crayons.green(message, bold=True)) -def generate_bdist_wheel_universal(setup_file, package_name): - _generate_dist('bdist_wheel', setup_file, package_name, - ['bdist_wheel', '--universal']) +def generate_bdist_wheel(setup_file, package_name, universal=False): + if universal: + _generate_dist('bdist_wheel', setup_file, package_name, + ['bdist_wheel', '--universal']) + else: + _generate_dist('bdist_wheel', setup_file, package_name, + ['bdist_wheel']) def twine_upload(dist_dirs): message = 'Uploading distributions under the following directories:' @@ -226,7 +230,10 @@ def main(): for setup_file in setup_py_files: package_name = os.path.basename(os.path.dirname(setup_file)) - generate_bdist_wheel_universal(setup_file, package_name) + if package_name == 'zulip_bots': + generate_bdist_wheel(setup_file, package_name) + else: + generate_bdist_wheel(setup_file, package_name, universal=True) set_variable(bots_setup, 'IS_PYPA_PACKAGE', False)