Skip to content

Commit

Permalink
On Windows, SYSTEMROOT must be supplied.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 8, 2020
1 parent 41deeb7 commit d6ec58c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setuptools/tests/test_distutils_adoption.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ def popen_text(call):
if sys.version_info < (3, 7) else functools.partial(call, text=True)


def find_distutils(venv, imports='distutils', **kwargs):
def find_distutils(venv, imports='distutils', env=None, **kwargs):
py_cmd = 'import {imports}; print(distutils.__file__)'.format(**locals())
cmd = ['python', '-c', py_cmd]
if platform.system == 'Windows':
env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
return popen_text(venv.run)(cmd, **kwargs)


Expand Down

0 comments on commit d6ec58c

Please sign in to comment.