Enforces python2.6 / 2.7, thanks to orsonmmz
This commit is contained in:
parent
b4f6cc45f2
commit
4da4a558a9
|
@ -513,18 +513,24 @@ set( INC_AFTER
|
||||||
# Find Python and other scripting resources
|
# Find Python and other scripting resources
|
||||||
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
||||||
|
|
||||||
if( NOT APPLE )
|
if( APPLE )
|
||||||
set( PythonInterp_FIND_VERSION )
|
|
||||||
else()
|
|
||||||
set( PYTHON_LIBRARY /System/Library/Frameworks/Python.framework/Versions/2.6/Python )
|
set( PYTHON_LIBRARY /System/Library/Frameworks/Python.framework/Versions/2.6/Python )
|
||||||
set( PYTHON_INCLUDE_DIR /System/Library/Frameworks/Python.framework/Versions//2.6/include/python2.6 )
|
set( PYTHON_INCLUDE_DIR /System/Library/Frameworks/Python.framework/Versions//2.6/include/python2.6 )
|
||||||
set( PythonInterp_FIND_VERSION 2.6 )
|
set( PythonInterp_FIND_VERSION 2.6 )
|
||||||
set( PythonLibs_FIND_VERSION 2.6 )
|
set( PythonLibs_FIND_VERSION 2.6 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# force a python version < 3.0
|
||||||
|
set( PythonInterp_FIND_VERSION 2.6)
|
||||||
|
set( PythonLibs_FIND_VERSION 2.6 )
|
||||||
|
|
||||||
find_package( PythonInterp )
|
find_package( PythonInterp )
|
||||||
|
|
||||||
check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
|
check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
|
||||||
|
|
||||||
|
if( NOT PYTHON_VERSION_MAJOR EQUAL 2 )
|
||||||
|
message( FATAL_ERROR "Python 2.x is required." )
|
||||||
|
endif()
|
||||||
# Get the correct Python site package install path from the Python interpreter found by
|
# Get the correct Python site package install path from the Python interpreter found by
|
||||||
# FindPythonInterp unless the user specifically defined a custom path.
|
# FindPythonInterp unless the user specifically defined a custom path.
|
||||||
if( NOT PYTHON_SITE_PACKAGE_PATH )
|
if( NOT PYTHON_SITE_PACKAGE_PATH )
|
||||||
|
@ -542,7 +548,7 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
||||||
mark_as_advanced( PYTHON_DEST )
|
mark_as_advanced( PYTHON_DEST )
|
||||||
message( STATUS "Python module install path: ${PYTHON_DEST}" )
|
message( STATUS "Python module install path: ${PYTHON_DEST}" )
|
||||||
|
|
||||||
find_package( PythonLibs )
|
find_package( PythonLibs 2.6 )
|
||||||
|
|
||||||
#message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" )
|
#message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue