Skip to content

Commit

Permalink
Merge branch 'master' into lazy_variable_object
Browse files Browse the repository at this point in the history
* master:
  Update README to reflect that linkedin's pygradle produces pex files (pex-tool#308)
  Release 1.1.15
  Fix pex-tool#309 by deduplicating output of the distribution finder. (pex-tool#310)
  Update wheel dependency to >0.26.0 (pex-tool#304)
  • Loading branch information
lorencarvalho committed Nov 30, 2016
2 parents fd71aa2 + 036b937 commit 754622e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release Notes
=============

1.1.15
------

* Fix #309 by deduplicating output of the distribution finder. (#310)
`#310 <https://github.com/pantsbuild/pex/pull/310>`_

* Update wheel dependency to >0.26.0. (#304)
`#304 <https://github.com/pantsbuild/pex/pull/304>`_

1.1.14
------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<http://pantsbuild.github.io/>`_ and `Buck <http://facebook.github.io/buck/>`_ also
<http://pantsbuild.github.io/>`_, `Buck <http://facebook.github.io/buck/>`_, and `{py}gradle <https://github.com/linkedin/pygradle>`_ also
support building .pex files directly.

Still unsure about what pex does or how it works? Watch this quick lightning
Expand Down
13 changes: 8 additions & 5 deletions pex/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pex/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pex/version.py
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 754622e

Please sign in to comment.