129 lines
6.6 KiB
Diff
129 lines
6.6 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index acf5dcf..91f1fc6 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -67,7 +67,7 @@ packaging_set_other_options (TBZ2 "TBZ2;TGZ")
|
|
## Dependencies ##
|
|
########################################
|
|
#
|
|
-get_external_libs (git "python 3.4" "boost 1.48" "icu 4.2" protobuf readline
|
|
+get_external_libs (git "python 2.7" "boost 1.48" "icu 4.2" protobuf readline
|
|
"xapian 1.0" "soci 3.0" "sqlite 3.0" "mysql 5.1" doxygen)
|
|
|
|
|
|
diff --git a/config/project_config_embeddable.cmake b/config/project_config_embeddable.cmake
|
|
index 5d44da0..475f3a3 100644
|
|
--- a/config/project_config_embeddable.cmake
|
|
+++ b/config/project_config_embeddable.cmake
|
|
@@ -485,36 +485,36 @@ macro (get_python)
|
|
unset (_required_version)
|
|
if (${ARGC} GREATER 0)
|
|
set (_required_version ${ARGV0})
|
|
- message (STATUS "Requires Python with version ${_required_version}; however just Python3 is considered here")
|
|
+ message (STATUS "Requires Python with version ${_required_version}; however just Python2 is considered here")
|
|
else (${ARGC} GREATER 0)
|
|
- message (STATUS "Requires Python3; any version will do")
|
|
+ message (STATUS "Requires Python2; any version will do")
|
|
endif (${ARGC} GREATER 0)
|
|
|
|
# The first check searches for the libraries and include paths.
|
|
# However, on some older versions (e.g., on RedHat/CentOS 5.x),
|
|
# only the static library is searched.
|
|
- find_package (Python3 COMPONENTS Interpreter Development REQUIRED)
|
|
+ find_package (Python2 COMPONENTS Interpreter Development REQUIRED)
|
|
|
|
# The second check is to get the dynamic library for sure.
|
|
#find_package (PythonLibsWrapper ${_required_version} REQUIRED)
|
|
|
|
- if (Python3_FOUND)
|
|
- message (STATUS "Found Python3 ${Python3_VERSION} (${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH})")
|
|
+ if (Python2_FOUND)
|
|
+ message (STATUS "Found Python2 ${Python2_VERSION} (${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}.${Python2_VERSION_PATCH})")
|
|
|
|
# Set the Python installation directory
|
|
set (INSTALL_PY_LIB_DIR
|
|
- ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
|
|
+ ${INSTALL_LIB_DIR}/python${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
|
|
CACHE PATH "Installation directory for Python libraries")
|
|
|
|
# Update the list of include directories for the project
|
|
- include_directories (${Python3_INCLUDE_DIRS})
|
|
+ include_directories (${Python2_INCLUDE_DIRS})
|
|
|
|
# Update the list of dependencies for the project
|
|
- list (APPEND PROJ_DEP_LIBS_FOR_LIB ${Python3_LIBRARIES})
|
|
+ list (APPEND PROJ_DEP_LIBS_FOR_LIB ${Python2_LIBRARIES})
|
|
|
|
- else (Python3_FOUND)
|
|
+ else (Python2_FOUND)
|
|
message (FATAL_ERROR "Python libraries are missing. Please install them (e.g., 'python-devel' for the Fedora/RedHat package)")
|
|
- endif (Python3_FOUND)
|
|
+ endif (Python2_FOUND)
|
|
|
|
endmacro (get_python)
|
|
|
|
@@ -612,14 +612,14 @@ macro (get_boost)
|
|
# On some platform/Boost version combinations, the Python version
|
|
# may be just the major version (2 or 3 as of 2019) or the major
|
|
# and minor versions (e.g., 27, 28, 34, 36, 37, 38 as of 2019)
|
|
- set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
|
|
- set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
|
|
+ set (python_cpt_name1 "python${Python2_VERSION_MAJOR}")
|
|
+ set (python_cpt_name2 "python${Python2_VERSION_MAJOR}${Python2_VERSION_MINOR}")
|
|
set (Boost_USE_STATIC_LIBS OFF)
|
|
set (Boost_USE_MULTITHREADED ON)
|
|
set (Boost_USE_STATIC_RUNTIME OFF)
|
|
set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
|
|
date_time random iostreams serialization filesystem system
|
|
- locale ${python_cpt_name1} ${python_cpt_name2} regex)
|
|
+ locale python ${python_cpt_name1} ${python_cpt_name2} regex)
|
|
set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
|
|
set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
|
|
set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}
|
|
@@ -642,9 +642,8 @@ macro (get_boost)
|
|
# Boost.Python library
|
|
message (STATUS " + Boost_PYTHON_VERSION: ${Boost_PYTHON_VERSION}")
|
|
message (STATUS " + Boost_PYTHON_LIBRARY: ${Boost_PYTHON_LIBRARY}")
|
|
- message (STATUS " + Boost_PYTHON3_LIBRARY: ${Boost_PYTHON3_LIBRARY}")
|
|
- message (STATUS " + Boost_PYTHON37_LIBRARY: ${Boost_PYTHON37_LIBRARY}")
|
|
- message (STATUS " + Boost_PYTHON38_LIBRARY: ${Boost_PYTHON38_LIBRARY}")
|
|
+ message (STATUS " + Boost_PYTHON2_LIBRARY: ${Boost_PYTHON2_LIBRARY}")
|
|
+ message (STATUS " + Boost_PYTHON27_LIBRARY: ${Boost_PYTHON27_LIBRARY}")
|
|
|
|
# Update the list of include directories for the project
|
|
include_directories (${Boost_INCLUDE_DIRS})
|
|
@@ -1495,7 +1494,7 @@ macro (set_install_directories)
|
|
set (exec_prefix ${prefix})
|
|
set (bindir ${exec_prefix}/bin)
|
|
set (libdir ${exec_prefix}/${LIBDIR})
|
|
- set (pylibdir ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
|
|
+ set (pylibdir ${libdir}/python${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}/site-packages/py${PACKAGE})
|
|
set (libexecdir ${exec_prefix}/libexec)
|
|
set (sbindir ${exec_prefix}/sbin)
|
|
set (sysconfdir ${prefix}/etc)
|
|
@@ -2581,16 +2580,16 @@ endmacro (display_lcov)
|
|
|
|
# Python
|
|
macro (display_python)
|
|
- if (Python3_FOUND)
|
|
+ if (Python2_FOUND)
|
|
message (STATUS)
|
|
message (STATUS "* Python:")
|
|
- message (STATUS " - Python3_VERSION ............... : ${Python3_VERSION}")
|
|
- message (STATUS " - Python3_VERSION_{MJR,MNR,PTCH} : ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}.${Python3_VERSION_PATCH}")
|
|
- message (STATUS " - Python3_INCLUDE_DIRS .......... : ${Python3_INCLUDE_DIRS}")
|
|
- message (STATUS " - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
|
|
- message (STATUS " - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
|
|
- message (STATUS " - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
|
|
- endif (Python3_FOUND)
|
|
+ message (STATUS " - Python2_VERSION ............... : ${Python2_VERSION}")
|
|
+ message (STATUS " - Python2_VERSION_{MJR,MNR,PTCH} : ${Python2_VERSION_MAJOR}.${Python2_VERSION_MINOR}.${Python2_VERSION_PATCH}")
|
|
+ message (STATUS " - Python2_INCLUDE_DIRS .......... : ${Python2_INCLUDE_DIRS}")
|
|
+ message (STATUS " - Python2_LIBRARIES ............. : ${Python2_LIBRARIES}")
|
|
+ message (STATUS " - Python2_LIBRARY_DIRS .......... : ${Python2_LIBRARY_DIRS}")
|
|
+ message (STATUS " - Python2_RUNTIME_LIBRARY_DIRS .. : ${Python2_RUNTIME_LIBRARY_DIRS}")
|
|
+ endif (Python2_FOUND)
|
|
endmacro (display_python)
|
|
|
|
# ICU
|