Skip to content

Commit

Permalink
Drop PasteScript specific hack
Browse files Browse the repository at this point in the history
With or without, pip works the same with PasteScript latest version and
crashes the same with versions 0.3/0.3.1
  • Loading branch information
xavfernandez committed Nov 26, 2015
1 parent 7f07a6e commit fee626d
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions pip/req/req_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def run_egg_info(self):
)

with indent_log():
script = self._run_setup_py % self.setup_py
script = SETUPTOOLS_SHIM % self.setup_py
base_cmd = [sys.executable, '-c', script]
if self.isolated:
base_cmd += ["--no-user-cfg"]
Expand Down Expand Up @@ -456,24 +456,6 @@ def run_egg_info(self):
self.setup_py, self.name, metadata_name)
)

# FIXME: This is a lame hack, entirely for PasteScript which has
# a self-provided entry point that causes this awkwardness
_run_setup_py = """
from setuptools.command import egg_info
import pkg_resources
import os
def replacement_run(self):
self.mkpath(self.egg_info)
installer = self.distribution.fetch_build_egg
for ep in pkg_resources.iter_entry_points('egg_info.writers'):
# require=False is the change we're making:
writer = ep.load(require=False)
if writer:
writer(self, ep.name, os.path.join(self.egg_info,ep.name))
self.find_sources()
egg_info.egg_info.run = replacement_run
""" + SETUPTOOLS_SHIM

def egg_info_data(self, filename):
if self.satisfied_by is not None:
if not self.satisfied_by.has_metadata(filename):
Expand Down

0 comments on commit fee626d

Please sign in to comment.