mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-28 18:04:51 +00:00
Suggest the right package dependencies for Mako and six modules if python3 is found but the modules are missing
This commit is contained in:
parent
88d2241e09
commit
1e01bc623b
@ -567,25 +567,31 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
||||
###############################
|
||||
# Find Python required modules
|
||||
###############################
|
||||
include(SetupPython) #sets PYTHON_EXECUTABLE and PYTHON_DASH_B
|
||||
include(SetupPython) # sets PYTHON_EXECUTABLE and search for required modules
|
||||
GNSSSDR_PYTHON_CHECK_MODULE("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||
GNSSSDR_PYTHON_CHECK_MODULE("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||
GNSSSDR_PYTHON_CHECK_MODULE("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||
|
||||
if(NOT PYTHON_MIN_VER_FOUND)
|
||||
message(FATAL_ERROR "Python ${GNSSSDR_PYTHON_MIN_VERSION} or greater required to build VOLK_GNSSSDR")
|
||||
endif()
|
||||
endif(NOT PYTHON_MIN_VER_FOUND)
|
||||
|
||||
if(${PYTHON3})
|
||||
set(PYTHON_NAME "python3")
|
||||
else(${PYTHON3})
|
||||
set(PYTHON_NAME "python")
|
||||
endif(${PYTHON3})
|
||||
|
||||
# Mako
|
||||
if(NOT MAKO_FOUND)
|
||||
message(STATUS "Mako templates not found. See http://www.makotemplates.org/ ")
|
||||
message(STATUS "Mako template library not found. See http://www.makotemplates.org/ ")
|
||||
message(STATUS " You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(STATUS " sudo yum install python-mako")
|
||||
message(STATUS " sudo yum install ${PYTHON_NAME}-mako")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(STATUS " sudo zypper install python-Mako")
|
||||
message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(STATUS " sudo apt-get install python-mako")
|
||||
message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
||||
endif(NOT MAKO_FOUND)
|
||||
@ -595,11 +601,11 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
||||
message(STATUS "python-six not found. See https://pythonhosted.org/six/ ")
|
||||
message(STATUS " You can try to install it by typing:")
|
||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(STATUS " sudo yum install python-six")
|
||||
message(STATUS " sudo yum install ${PYTHON_NAME}-six")
|
||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||
message(STATUS " sudo zypper install python-six")
|
||||
message(STATUS " sudo zypper install ${PYTHON_NAME}-six")
|
||||
else(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(STATUS " sudo apt-get install python-six")
|
||||
message(STATUS " sudo apt-get install ${PYTHON_NAME}-six")
|
||||
endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||
message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR")
|
||||
endif(NOT SIX_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user