diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-06-10 18:32:47 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-06-10 18:35:33 +0200 |
commit | 68d8900c6c03f16d83fafb48cbdee555ee47f132 (patch) | |
tree | 3005610e381bf1f887871c1c923721bbbd3d3201 /scripts/link_pyqt.py | |
parent | ddd343c89c2ddf6e478d8d4097f48caa018ae2f7 (diff) | |
download | qutebrowser-68d8900c6c03f16d83fafb48cbdee555ee47f132.tar.gz qutebrowser-68d8900c6c03f16d83fafb48cbdee555ee47f132.zip |
link_pyqt: Support PYTHON environment variable.
Diffstat (limited to 'scripts/link_pyqt.py')
-rw-r--r-- | scripts/link_pyqt.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/link_pyqt.py b/scripts/link_pyqt.py index b35fed126..20e8e3e21 100644 --- a/scripts/link_pyqt.py +++ b/scripts/link_pyqt.py @@ -140,7 +140,10 @@ def get_python_lib(executable, venv=False): treatments for Windows/Ubuntu shouldn't take place. """ 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 # Windows when running via tox, and sys.prefix is empty too... return os.path.join(os.path.dirname(executable), '..', 'Lib', |