Skip to content

Commit

Permalink
Pseudocode to fix issue pypa#1299
Browse files Browse the repository at this point in the history
I am not sure how to detect that pip is run as pip.exe
  • Loading branch information
techtonik committed Mar 25, 2014
1 parent a5decaa commit 090f9ac
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pip/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ def run(self, options, args):

session = self._build_session(options)


# --- find package names and versions ---

finder = self._build_package_finder(options, index_urls, session)

requirement_set = RequirementSet(
Expand Down Expand Up @@ -311,6 +314,17 @@ def run(self, options, args):
logger.warn(msg)
return


# --- download and install ---

# pseudocode to solve issue #1299
#if 'pip' in requirement_set:
# logger.notify('Attempt to update itself.')
# if pip_exe:
# logger.warn('Restarting pip with python.exe:')
# logger.warn(' python -m pip ...')
# os.execv(sys.executable, ['-m', 'pip', 'install'] + args)

try:
if not options.no_download:
requirement_set.prepare_files(
Expand Down

0 comments on commit 090f9ac

Please sign in to comment.