link_pyqt: Support PYTHON environment variable.
This commit is contained in:
parent
ddd343c89c
commit
68d8900c6c
@ -140,7 +140,10 @@ def get_python_lib(executable, venv=False):
|
|||||||
treatments for Windows/Ubuntu shouldn't take place.
|
treatments for Windows/Ubuntu shouldn't take place.
|
||||||
"""
|
"""
|
||||||
distribution = platform.linux_distribution(full_distribution_name=False)
|
distribution = platform.linux_distribution(full_distribution_name=False)
|
||||||
if os.name == 'nt' and not venv:
|
if 'PYTHON' in os.environ and not venv:
|
||||||
|
# e.g. on AppVeyor
|
||||||
|
return os.path.join(os.environ['PYTHON'], 'Lib', 'site-packages')
|
||||||
|
elif os.name == 'nt' and not venv:
|
||||||
# For some reason, we get an empty string from get_python_lib() on
|
# For some reason, we get an empty string from get_python_lib() on
|
||||||
# Windows when running via tox, and sys.prefix is empty too...
|
# Windows when running via tox, and sys.prefix is empty too...
|
||||||
return os.path.join(os.path.dirname(executable), '..', 'Lib',
|
return os.path.join(os.path.dirname(executable), '..', 'Lib',
|
||||||
|
Loading…
Reference in New Issue
Block a user