diff --git a/CHANGES.rst b/CHANGES.rst index 5dced05cd..988261b4b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,15 @@ Release Notes ============= +1.1.15 +------ + +* Fix #309 by deduplicating output of the distribution finder. (#310) + `#310 `_ + +* Update wheel dependency to >0.26.0. (#304) + `#304 `_ + 1.1.14 ------ diff --git a/README.rst b/README.rst index 0e18feae9..c7bc62eff 100644 --- a/README.rst +++ b/README.rst @@ -12,7 +12,7 @@ include multiple platform-specific Python distributions, meaning that a single p can be portable across Linux and OS X. pex files can be built using the ``pex`` tool. Build systems such as `Pants -`_ and `Buck `_ also +`_, `Buck `_, and `{py}gradle `_ also support building .pex files directly. Still unsure about what pex does or how it works? Watch this quick lightning diff --git a/pex/environment.py b/pex/environment.py index 162ab8eb6..b8e920108 100644 --- a/pex/environment.py +++ b/pex/environment.py @@ -82,17 +82,20 @@ def write_zipped_internal_cache(cls, pex, pex_info): distribution_name, dist_digest)) if os.path.exists(cached_location): dist = DistributionHelper.distribution_from_path(cached_location) - existing_cached_distributions.append(dist) - continue + if dist is not None: + existing_cached_distributions.append(dist) + continue else: dist = DistributionHelper.distribution_from_path(os.path.join(pex, internal_dist_path)) - if DistributionHelper.zipsafe(dist) and not pex_info.always_write_cache: - zip_safe_distributions.append(dist) - continue + if dist is not None: + if DistributionHelper.zipsafe(dist) and not pex_info.always_write_cache: + zip_safe_distributions.append(dist) + continue with TRACER.timed('Caching %s' % dist): newly_cached_distributions.append( CacheHelper.cache_distribution(zf, internal_dist_path, cached_location)) + return existing_cached_distributions, newly_cached_distributions, zip_safe_distributions @classmethod diff --git a/pex/util.py b/pex/util.py index f2fb11350..ad1b4b4e6 100644 --- a/pex/util.py +++ b/pex/util.py @@ -89,9 +89,9 @@ def distribution_from_path(cls, path, name=None): # Monkeypatch pkg_resources finders should it not already be so. register_finders() if name is None: - distributions = list(find_distributions(path)) + distributions = set(find_distributions(path)) if len(distributions) == 1: - return distributions[0] + return distributions.pop() else: for dist in find_distributions(path): if dist.project_name == name: diff --git a/pex/version.py b/pex/version.py index 38d589a21..e3ded9f2e 100644 --- a/pex/version.py +++ b/pex/version.py @@ -1,7 +1,7 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -__version__ = '1.1.14' +__version__ = '1.1.15' SETUPTOOLS_REQUIREMENT = 'setuptools>=2.2,<20.11' -WHEEL_REQUIREMENT = 'wheel>=0.24.0,<0.30.0' +WHEEL_REQUIREMENT = 'wheel>=0.26.0,<0.30.0'