From 5e89a73d4214a53ef23614b2f59d6c10b1313180 Mon Sep 17 00:00:00 2001 From: Kris Wilson Date: Tue, 15 May 2018 09:47:00 -0700 Subject: [PATCH] Fixups and review feedback. --- pex/bin/pex.py | 14 +++++++------- pex/finders.py | 1 + pex/package.py | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pex/bin/pex.py b/pex/bin/pex.py index c0cb017c3..cbcfa0f87 100755 --- a/pex/bin/pex.py +++ b/pex/bin/pex.py @@ -346,12 +346,12 @@ def configure_clp_pex_environment(parser): action='append', help='The platform for which to build the PEX. This option can be passed multiple times ' 'to create a multi-platform pex. To use wheels for specific interpreter/platform tags' - 'platform tags, you can append them to the platform with hyphens like: ' - 'PLATFORM-IMPL-PYVER-ABI (e.g. "linux_x86_64-cp-27-cp27mu", "macosx_10.12_x86_64-cp-36' - '-cp36m") PLATFORM is the host platform e.g. "linux-x86_64", "macosx-10.12-x86_64", etc' - '". IMPL is the python implementation abbreviation (e.g. "cp", "pp", "jp"). PYVER is ' - 'a two-digit string representing the python version (e.g. "27", "36"). ABI is the ABI ' - 'tag (e.g. "cp36m", "cp27mu", "abi3", "none"). Default: current platform.') + ', you can append them to the platform with hyphens like: PLATFORM-IMPL-PYVER-ABI ' + '(e.g. "linux_x86_64-cp-27-cp27mu", "macosx_10.12_x86_64-cp-36-cp36m") PLATFORM is ' + 'the host platform e.g. "linux-x86_64", "macosx-10.12-x86_64", etc". IMPL is the ' + 'python implementation abbreviation (e.g. "cp", "pp", "jp"). PYVER is a two-digit ' + 'string representing the python version (e.g. "27", "36"). ABI is the ABI tag ' + '(e.g. "cp36m", "cp27mu", "abi3", "none"). Default: current platform.') group.add_option( '--interpreter-cache-dir', @@ -702,7 +702,7 @@ def main(args=None): return 0 if not _compatible_with_current_platform(options.platforms): - log('WARNING: attempting to run PEX with incompatible platforms!', v=1) + log('WARNING: attempting to run PEX with incompatible platforms!') pex_builder.freeze() diff --git a/pex/finders.py b/pex/finders.py index 055571588..686b9fc17 100644 --- a/pex/finders.py +++ b/pex/finders.py @@ -102,6 +102,7 @@ class WheelMetadata(pkg_resources.EggMetadata): @classmethod def _split_wheelname(cls, wheelname): split_wheelname = wheelname.rsplit('-', 4) + assert len(split_wheelname) == 5, 'invalid wheel name: %s' % (wheelname) split_wheelname[0] = split_wheelname[0].replace('-', '_') return '-'.join(split_wheelname[:-3]) diff --git a/pex/package.py b/pex/package.py index 1cb13e2bd..cfdb9b70a 100644 --- a/pex/package.py +++ b/pex/package.py @@ -170,6 +170,8 @@ def __init__(self, url, **kw): elif self.py_version == '3.2': self._supported_tags.add(('pp321', abi_tag, tag_platform)) elif self.py_version == '3.3': + # N.B. PyPy 3.3 maps to `pp352` because of PyPy versioning. + # see e.g. http://doc.pypy.org/en/latest/release-pypy3.3-v5.2-alpha1.html self._supported_tags.add(('pp352', abi_tag, tag_platform)) elif self.py_version == '3.5': self._supported_tags.add(('pp357', abi_tag, tag_platform))