Set PATH in build_release.py when calling tox

On Windows, we need to have the proper Python folder in PATH when using PyQt5,
so it can load python3.dll properly.
This commit is contained in:
Florian Bruhin 2017-05-24 20:52:57 +02:00
parent 1adcf28e31
commit 464eb29704

View File

@ -62,6 +62,7 @@ def call_tox(toxenv, *args, python=sys.executable):
"""
env = os.environ.copy()
env['PYTHON'] = python
env['PATH'] = os.environ['PATH'] + os.pathsep + os.path.dirname(python)
subprocess.check_call(
[sys.executable, '-m', 'tox', '-v', '-e', toxenv] + list(args),
env=env)