From 5d8fd732c9d91fc464a54109099a07b47dd4e343 Mon Sep 17 00:00:00 2001 From: Jean-Manuel Caba Date: Thu, 24 Jun 2010 14:55:17 +0000 Subject: [PATCH] in some configurations FindPythonPackages.cmake was abording compilation ... now no more --- .../cmake_modules/FindPythonSitePackages.cmake | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/vlsisapd/cmake_modules/FindPythonSitePackages.cmake b/vlsisapd/cmake_modules/FindPythonSitePackages.cmake index 8b662bb0..a5ceb1ee 100644 --- a/vlsisapd/cmake_modules/FindPythonSitePackages.cmake +++ b/vlsisapd/cmake_modules/FindPythonSitePackages.cmake @@ -1,17 +1,13 @@ if ( UNIX ) - execute_process ( COMMAND python - -c -" -import os.path -import distutils.sysconfig - -pathes = distutils.sysconfig.get_python_lib().split('/') -print os.path.join ( pathes[-2], pathes[-1] ) -" + execute_process(COMMAND echo "import os.path,distutils.sysconfig;pathes = distutils.sysconfig.get_python_lib().split('/');print os.path.join ( pathes[-2], pathes[-1] )" + OUTPUT_FILE /tmp/site.py) + execute_process ( COMMAND python /tmp/site.py OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE RESULT_VARIABLE RCODE) + execute_process ( COMMAND rm -f /tmp/site.py) + if ( RCODE EQUAL 0 ) set ( FindPythonSitePackages_FOUND TRUE ) else ( RCODE EQUAL 0 )