#-----------------------------------------------------------------------------
if (BUILD_IMPORTER)
- find_package(PythonInterp 3)
+ find_package(PythonInterp 3.5 REQUIRED)
find_program(PYOSMIUM pyosmium-get-changes)
if (NOT EXISTS "${PYOSMIUM}")
set(TEST_BDD db osm2pgsql api)
+ find_program(PYLINT NAMES pylint3 pylint)
+
foreach (test ${TEST_BDD})
add_test(NAME bdd_${test}
COMMAND behave ${test}
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()
#-----------------------------------------------------------------------------