Skip to content

Commit 090f9ac

Browse files
committed
Pseudocode to fix issue pypa#1299
I am not sure how to detect that pip is run as pip.exe
1 parent a5decaa commit 090f9ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pip/commands/install.py

+14
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ def run(self, options, args):
268268

269269
session = self._build_session(options)
270270

271+
272+
# --- find package names and versions ---
273+
271274
finder = self._build_package_finder(options, index_urls, session)
272275

273276
requirement_set = RequirementSet(
@@ -311,6 +314,17 @@ def run(self, options, args):
311314
logger.warn(msg)
312315
return
313316

317+
318+
# --- download and install ---
319+
320+
# pseudocode to solve issue #1299
321+
#if 'pip' in requirement_set:
322+
# logger.notify('Attempt to update itself.')
323+
# if pip_exe:
324+
# logger.warn('Restarting pip with python.exe:')
325+
# logger.warn(' python -m pip ...')
326+
# os.execv(sys.executable, ['-m', 'pip', 'install'] + args)
327+
314328
try:
315329
if not options.no_download:
316330
requirement_set.prepare_files(

0 commit comments

Comments
 (0)