Skip to content

Commit 49aec66

Browse files
committed
Merge pull request pex-tool#145 from jsirois/jsirois/issues/144
Accommodate OSX `Python` python binaries.
2 parents 4f96494 + 82c36da commit 49aec66

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGES.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@ CHANGES
33
=======
44

55
----------
6-
1.0.2.dev0
6+
1.0.3.dev0
77
----------
88

9+
* Bug fix: Accommodate OSX `Python` python binaries. Previously the OSX python distributions shipped
10+
with OSX, XCode and available via https://www.python.org/downloads/ could fail to be detected using
11+
the `PythonInterpreter` class.
12+
Fixes `#144 <https://github.com/pantsbuild/pex/issues/144>`_.
13+
14+
-----
15+
1.0.2
16+
-----
17+
918
* Bug fix: PEX-INFO values were overridden by environment `Variables` with default values that were
1019
not explicitly set in the environment.
1120
Fixes `#135 <https://github.com/pantsbuild/pex/issues/135>`_.

pex/interpreter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ def __hash__(self):
178178
class PythonInterpreter(object):
179179
REGEXEN = (
180180
re.compile(r'jython$'),
181-
re.compile(r'python$'),
181+
182+
# NB: OSX ships python binaries named Python so we allow for capital-P.
183+
re.compile(r'[Pp]ython$'),
184+
182185
re.compile(r'python[23].[0-9]$'),
183186
re.compile(r'pypy$'),
184187
re.compile(r'pypy-1.[0-9]$'),

pex/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

4-
__version__ = '1.0.2'
4+
__version__ = '1.0.3.dev0'
55

66
SETUPTOOLS_REQUIREMENT = 'setuptools>=2.2,<16'
77
WHEEL_REQUIREMENT = 'wheel>=0.24.0,<0.25.0'

0 commit comments

Comments
 (0)