X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/57f5e6d898b944078c86e6c7c418e6585d739178..d9998bfab321bce44d35fcaa881fe682e66714d8:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c3730e3..761531b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ endif() #----------------------------------------------------------------------------- if (BUILD_IMPORTER) - find_package(PythonInterp 3) + find_package(PythonInterp 3.5 REQUIRED) find_program(PYOSMIUM pyosmium-get-changes) if (NOT EXISTS "${PYOSMIUM}") @@ -98,7 +98,6 @@ if (BUILD_IMPORTER) set(CUSTOMSCRIPTS check_import_finished.php country_languages.php - importWikipedia.php export.php query.php setup.php @@ -112,17 +111,8 @@ if (BUILD_IMPORTER) ${PROJECT_BINARY_DIR}/utils/${script_source}) endforeach() - set(NOMINATIM_TOOLS - setup - update - admin - query - ) - - foreach (tool_name ${NOMINATIM_TOOLS}) - configure_file(${PROJECT_SOURCE_DIR}/cmake/tool.tmpl - ${PROJECT_BINARY_DIR}/nominatim-${tool_name}) - endforeach() + configure_file(${PROJECT_SOURCE_DIR}/cmake/tool.tmpl + ${PROJECT_BINARY_DIR}/nominatim) endif() #----------------------------------------------------------------------------- @@ -150,6 +140,8 @@ if (BUILD_TESTS) set(TEST_BDD db osm2pgsql api) + find_program(PYLINT NAMES pylint3 pylint) + foreach (test ${TEST_BDD}) add_test(NAME bdd_${test} COMMAND behave ${test} @@ -165,6 +157,15 @@ if (BUILD_TESTS) add_test(NAME phpcs COMMAND phpcs --report-width=120 --colors lib website utils WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) + + if (PYLINT) + message(STATUS "Using '${PYLINT}' for Python linting.") + add_test(NAME pylint + COMMAND ${PYLINT} nominatim + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) + else() + message(STATUS "pylint not found. Linting tests disabled.") + endif() endif() #-----------------------------------------------------------------------------