View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012920CMakeModulespublic2012-01-30 11:122012-07-09 06:52
ReporterChip Christian 
Assigned ToRolf Eike Beer 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSRHELOS Version5.7
Product VersionCMake 2.8.7 
Target VersionCMake 2.8.8Fixed in VersionCMake 2.8.8 
Summary0012920: FindPythonInterp.cmake fails to find python version
Descriptionpython 2.4.3 does not support a "--version" arg but *does* provide "-V"

also, as written it requires FindPackageHandleStandardArgs.cmake to be located in the same directory for some reason

patch can be found in Additional Information
Additional Information--- /usr/share/cmake/Modules/FindPythonInterp.cmake 2011-12-30 10:49:56.000000000 -0600
+++ cmake/FindPythonInterp.cmake 2012-01-30 10:04:37.000000000 -0600
@@ -51,7 +51,7 @@
 
 # determine python version string
 if(PYTHON_EXECUTABLE)
- execute_process(COMMAND "${PYTHON_EXECUTABLE}" --version ERROR_VARIABLE _VERSION OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -V ERROR_VARIABLE _VERSION OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
     string(REPLACE "Python " "" PYTHON_VERSION_STRING "${_VERSION}")
     string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}")
     string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}")
@@ -60,7 +60,7 @@
 
 # handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if
 # all listed variables are TRUE
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+# include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
 
 mark_as_advanced(PYTHON_EXECUTABLE)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0028423)
Rolf Eike Beer (developer)
2012-01-30 11:19

This has already been fixed in next branch 3 days ago:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bde7b5aafd5ab1ff180c900b0e473fc85bafa724 [^]
(0028429)
Rolf Eike Beer (developer)
2012-01-31 04:38

Bug is in wrong category...
(0029961)
David Cole (manager)
2012-07-09 06:52

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-01-30 11:12 Chip Christian New Issue
2012-01-30 11:19 Rolf Eike Beer Note Added: 0028423
2012-01-30 11:19 Rolf Eike Beer Assigned To => Rolf Eike Beer
2012-01-30 11:19 Rolf Eike Beer Status new => resolved
2012-01-30 11:19 Rolf Eike Beer Resolution open => fixed
2012-01-30 11:19 Rolf Eike Beer Fixed in Version => CMake 2.8.8
2012-01-30 11:19 Rolf Eike Beer Target Version => CMake 2.8.8
2012-01-31 04:38 Rolf Eike Beer Note Added: 0028429
2012-01-31 04:38 Rolf Eike Beer Status resolved => feedback
2012-01-31 04:38 Rolf Eike Beer Resolution fixed => reopened
2012-01-31 04:38 Rolf Eike Beer Status feedback => resolved
2012-01-31 04:38 Rolf Eike Beer Resolution reopened => fixed
2012-01-31 04:38 Rolf Eike Beer Category CMake => Modules
2012-07-09 06:52 David Cole Note Added: 0029961
2012-07-09 06:52 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team