Skip to content

Commit

Permalink
PIP_PYTHON_PATH
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
  • Loading branch information
kennethreitz committed Sep 26, 2017
1 parent 9250006 commit 7010383
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pipenv/patched/pip/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

wheel_ext = '.whl'

PIP_PYTHON_PATH = os.environ.get('PIP_PYTHON_PATH')
VERSION_COMPATIBLE = (1, 0)


Expand Down Expand Up @@ -181,7 +182,7 @@ def fix_script(path):
firstline = script.readline()
if not firstline.startswith(b'#!python'):
return False
exename = sys.executable.encode(sys.getfilesystemencoding())
exename = (PIP_PYTHON_PATH or sys.executable).encode(sys.getfilesystemencoding())
firstline = b'#!' + exename + os.linesep.encode("ascii")
rest = script.read()
with open(path, 'wb') as script:
Expand Down Expand Up @@ -700,7 +701,7 @@ def _build_one(self, req, output_dir, python_tag=None):

def _base_setup_args(self, req):
return [
sys.executable, "-u", '-c',
(PIP_PYTHON_PATH or sys.executable), "-u", '-c',
SETUPTOOLS_SHIM % req.setup_py
] + list(self.global_options)

Expand Down

0 comments on commit 7010383

Please sign in to comment.