]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Modify the search for python executable in accordance
authoradam <adam>
Wed, 29 Apr 2009 15:43:39 +0000 (15:43 +0000)
committeradam <adam>
Wed, 29 Apr 2009 15:43:39 +0000 (15:43 +0000)
of the official python windows i.e. python.exe is in
PYTHON_HOME

salome_adm/cmake_files/FindPYTHON.cmake

index 9d9934c335b8f8b51ed2aa1f0ba59c27e6100b91..a03b563a4d731fcefac56d691fdacf8c74568d92 100644 (file)
@@ -86,7 +86,7 @@ IF(PYTHON_STATUS)
     SET(PYTHON_EXECUTABLE_PATHS)
   ELSE(NOT PYTHON_ROOT_USER)
     IF(WINDOWS)
-      SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER} ${PYTHON_ROOT_USER}/bin ${PYTHON_ROOT_USER}/PCbuild)
+      SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER})
     ELSE(WINDOWS)
       SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}/bin)
     ENDIF(WINDOWS)
@@ -97,12 +97,10 @@ IF(PYTHON_STATUS)
     IF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
     ELSE(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
       SET(PYTHON_ROOT_USER ${PYTHON_EXECUTABLE})
-      IF(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND})
+      GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
+      IF(NOT WINDOWS)
        GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
-      ELSE(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND})
-       GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
-       GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH)
-      ENDIF(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND})
+      ENDIF(NOT WINDOWS)
     ENDIF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python)
   ELSE(PYTHON_EXECUTABLE)
     IF(PYTHON_ROOT_USER)