Skip to content

Commit

Permalink
Do not extend PATH - instead we pass --no-warn-script-location
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
  • Loading branch information
gaborbernat committed Oct 15, 2020
1 parent 95186e2 commit 7efa6d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/build/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ def _create_env_pythonhome(self): # type: () -> None
if env_scripts is None: # pragma: no cover
raise RuntimeError('Missing scripts directory in sysconfig')

exe_path = [env_scripts]
if 'PATH' in os.environ:
exe_path.append(os.environ['PATH'])

self._replace_env('PATH', os.pathsep.join(exe_path))
self._replace_env('PYTHONPATH', os.pathsep.join(sys_path))

# Point the Python interpreter to our environment
Expand Down
3 changes: 0 additions & 3 deletions tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

@pytest.mark.skipif(sys.version_info[0] != 2, reason='Custom isolated environment only available on Python 2')
def test_isolated_environment_setup():
old_path = os.environ['PATH']
with build.env.IsolatedEnvironment.for_current() as env:
if os.name != 'nt':
assert os.environ['PATH'] == os.pathsep.join([os.path.join(env.path, 'bin'), old_path])
assert os.environ['PYTHONHOME'] == env.path

python_path = map(os.path.normpath, os.environ['PYTHONPATH'].split(os.pathsep))
Expand Down

0 comments on commit 7efa6d4

Please sign in to comment.