Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill zipmanifest monkeypatching. #322

Merged
merged 2 commits into from
Dec 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions pex/pex_bootstrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ def get_pex_info(entry_point):
raise ValueError('Invalid entry_point: %s' % entry_point)


# TODO(wickman) Remove once resolved (#91):
# https://bitbucket.org/pypa/setuptools/issue/154/build_zipmanifest-results-should-be
def monkeypatch_build_zipmanifest():
import pkg_resources
if not hasattr(pkg_resources, 'build_zipmanifest'):
return
old_build_zipmanifest = pkg_resources.build_zipmanifest
def memoized_build_zipmanifest(archive, memo={}):
if archive not in memo:
memo[archive] = old_build_zipmanifest(archive)
return memo[archive]
pkg_resources.build_zipmanifest = memoized_build_zipmanifest


def find_in_path(target_interpreter):
if os.path.exists(target_interpreter):
return target_interpreter
Expand Down Expand Up @@ -90,7 +76,6 @@ def maybe_reexec_pex():

def bootstrap_pex(entry_point):
from .finders import register_finders
monkeypatch_build_zipmanifest()
register_finders()
maybe_reexec_pex()

Expand All @@ -104,7 +89,6 @@ def bootstrap_pex_env(entry_point):
from .finders import register_finders
from .pex_info import PexInfo

monkeypatch_build_zipmanifest()
register_finders()

PEXEnvironment(entry_point, PexInfo.from_pex(entry_point)).activate()
2 changes: 1 addition & 1 deletion pex/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

__version__ = '1.1.15'

SETUPTOOLS_REQUIREMENT = 'setuptools>=2.2,<20.11'
SETUPTOOLS_REQUIREMENT = 'setuptools>=5.7,<20.11'
WHEEL_REQUIREMENT = 'wheel>=0.26.0,<0.30.0'
2 changes: 1 addition & 1 deletion scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ coverage run -p -m py.test tests
coverage run -p -m pex.bin.pex -v --help >&/dev/null
coverage run -p -m pex.bin.pex -v -- scripts/do_nothing.py
coverage run -p -m pex.bin.pex -v requests -- scripts/do_nothing.py
coverage run -p -m pex.bin.pex -v . 'setuptools>=2.2,<20' -- scripts/do_nothing.py
coverage run -p -m pex.bin.pex -v . 'setuptools>=5.7,<20.11' -- scripts/do_nothing.py