Skip to content
Snippets Groups Projects
Commit a2264e40 authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Use the current virtualenv's python rather than the system default

  -> Windows-only

--HG--
branch : Viewer-Build
parent 9e446314
No related branches found
No related tags found
No related merge requests found
...@@ -5,21 +5,30 @@ set(PYTHONINTERP_FOUND) ...@@ -5,21 +5,30 @@ set(PYTHONINTERP_FOUND)
if (WINDOWS) if (WINDOWS)
# On Windows, explicitly avoid Cygwin Python. # On Windows, explicitly avoid Cygwin Python.
find_program(PYTHON_EXECUTABLE if (DEFINED ENV{VIRTUAL_ENV})
NAMES python25.exe python23.exe python.exe find_program(PYTHON_EXECUTABLE
NO_DEFAULT_PATH # added so that cmake does not find cygwin python NAMES python.exe
PATHS PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] "$ENV{VIRTUAL_ENV}\\scripts"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] NO_DEFAULT_PATH
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] )
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] else()
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] find_program(PYTHON_EXECUTABLE
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath] NAMES python25.exe python23.exe python.exe
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath] NO_DEFAULT_PATH # added so that cmake does not find cygwin python
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] PATHS
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
) [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
)
endif()
elseif (EXISTS /etc/debian_version) elseif (EXISTS /etc/debian_version)
# On Debian and Ubuntu, avoid Python 2.4 if possible. # On Debian and Ubuntu, avoid Python 2.4 if possible.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment