in some configurations FindPythonPackages.cmake was abording compilation ... now no more
This commit is contained in:
parent
fe342a9849
commit
5d8fd732c9
|
@ -1,17 +1,13 @@
|
||||||
|
|
||||||
if ( UNIX )
|
if ( UNIX )
|
||||||
|
|
||||||
execute_process ( COMMAND python
|
execute_process(COMMAND echo "import os.path,distutils.sysconfig;pathes = distutils.sysconfig.get_python_lib().split('/');print os.path.join ( pathes[-2], pathes[-1] )"
|
||||||
-c
|
OUTPUT_FILE /tmp/site.py)
|
||||||
"
|
execute_process ( COMMAND python /tmp/site.py
|
||||||
import os.path
|
|
||||||
import distutils.sysconfig
|
|
||||||
|
|
||||||
pathes = distutils.sysconfig.get_python_lib().split('/')
|
|
||||||
print os.path.join ( pathes[-2], pathes[-1] )
|
|
||||||
"
|
|
||||||
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
RESULT_VARIABLE RCODE)
|
RESULT_VARIABLE RCODE)
|
||||||
|
execute_process ( COMMAND rm -f /tmp/site.py)
|
||||||
|
|
||||||
if ( RCODE EQUAL 0 )
|
if ( RCODE EQUAL 0 )
|
||||||
set ( FindPythonSitePackages_FOUND TRUE )
|
set ( FindPythonSitePackages_FOUND TRUE )
|
||||||
else ( RCODE EQUAL 0 )
|
else ( RCODE EQUAL 0 )
|
||||||
|
|
Loading…
Reference in New Issue