Skip to content

Commit 341e71d

Browse files
committed
skip distribute in Requirements.install()
1 parent f6aae60 commit 341e71d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pip/req.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@ def unpack_url(self, link, location, only_download=False):
11461146

11471147
def install(self, install_options, global_options=()):
11481148
"""Install everything in this set (after having downloaded and unpacked the packages)"""
1149+
successful = []
11491150
to_install = [r for r in self.requirements.values()
11501151
if not r.satisfied_by]
11511152

@@ -1157,6 +1158,9 @@ def install(self, install_options, global_options=()):
11571158
if requirement.conflicts_with:
11581159
logger.notify('Found existing installation: %s'
11591160
% requirement.conflicts_with)
1161+
if requirement.name == 'distribute':
1162+
logger.notify('Cannot upgrade distribute. Skipping.')
1163+
continue
11601164
logger.indent += 2
11611165
try:
11621166
requirement.uninstall(auto_confirm=True)
@@ -1173,9 +1177,10 @@ def install(self, install_options, global_options=()):
11731177
if requirement.conflicts_with and requirement.install_succeeded:
11741178
requirement.commit_uninstall()
11751179
requirement.remove_temporary_source()
1180+
successful.append(requirement)
11761181
finally:
11771182
logger.indent -= 2
1178-
self.successfully_installed = to_install
1183+
self.successfully_installed = successful
11791184

11801185
def create_bundle(self, bundle_filename):
11811186
## FIXME: can't decide which is better; zip is easier to read

0 commit comments

Comments
 (0)