Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to find python3 to please tesh.py
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Sep 2016 10:54:41 +0000 (12:54 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Sep 2016 10:54:54 +0000 (12:54 +0200)
CMakeLists.txt
tools/cmake/MaintainerMode.cmake
tools/tesh/tesh.py

index aa8cfed..526bec1 100644 (file)
@@ -140,6 +140,12 @@ if(NOT PERL_FOUND)
   message(FATAL_ERROR "Please install Perl to compile SimGrid.")
 endif()
 
+# tesh.py needs python 3 (or the module python-subprocess32 on python2.8+)
+set(PythonInterp_FIND_VERSION 3)
+set(PythonInterp_FIND_VERSION_COUNT 1)
+set(PythonInterp_FIND_VERSION_MAJOR 3)
+include(FindPythonInterp)
+
 if (APPLE)
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
index d9b652a..233fcec 100644 (file)
@@ -10,9 +10,7 @@ set(FLEX_MIN_PATCH 39)
 
 # the rest should only be changed if you understand what you're doing
 if(enable_maintainer_mode AND NOT WIN32)
-  find_program(PYTHON_EXE NAMES python)
-  mark_as_advanced(PYTHON_EXE)
-  if (PYTHON_EXE)
+  if (PYTHON_EXECUTABLE)
     add_custom_command(
       OUTPUT
       ${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.cpp
@@ -25,7 +23,7 @@ if(enable_maintainer_mode AND NOT WIN32)
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls.in
 
       COMMENT "Generating simcalls source files"
-      COMMAND ${PYTHON_EXE} simcalls.py
+      COMMAND ${PYTHON_EXECUTABLE} simcalls.py
       WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/src/simix/
       )
 
index 984e23d..7e1ace3 100755 (executable)
@@ -5,7 +5,7 @@
 tesh -- testing shell
 ========================
 
-Copyright (c) 2012-2015. The SimGrid Team.
+Copyright (c) 2012-2016. The SimGrid Team.
 All rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
@@ -13,7 +13,7 @@ under the terms of the license (GNU LGPL) which comes with this package.
 
 
 #TODO: child of child of child that printfs. Does it work?
-#TODO: a child die after its parent. What happen?
+#TODO: a child dies after its parent. What happen?
 
 #TODO: regular expression in output
 #ex: >> Time taken: [0-9]+s