From fee626d099a3444fc850663e3441c63459849f5b Mon Sep 17 00:00:00 2001 From: Xavier Fernandez Date: Thu, 26 Nov 2015 09:37:41 +0100 Subject: [PATCH] Drop PasteScript specific hack With or without, pip works the same with PasteScript latest version and crashes the same with versions 0.3/0.3.1 --- pip/req/req_install.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/pip/req/req_install.py b/pip/req/req_install.py index 9a36ae1adcf..ae957e5b72f 100644 --- a/pip/req/req_install.py +++ b/pip/req/req_install.py @@ -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"] @@ -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):