diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 26c74eeb6b..d441006b15 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -370,6 +370,7 @@ hunter_default_version(pip_lazy-object-proxy VERSION 1.3.1) hunter_default_version(pip_nose VERSION 1.3.7) hunter_default_version(pip_nose-timer VERSION 0.7.5) hunter_default_version(pip_numpy VERSION 1.16.2) +hunter_default_version(pip_pylint VERSION 2.3.1) hunter_default_version(pip_six VERSION 1.12.0) hunter_default_version(pip_smmap VERSION 2.0.5) hunter_default_version(pip_wrapt VERSION 1.11.1) diff --git a/cmake/projects/pip_pylint/hunter.cmake b/cmake/projects/pip_pylint/hunter.cmake new file mode 100644 index 0000000000..0d4f237fb1 --- /dev/null +++ b/cmake/projects/pip_pylint/hunter.cmake @@ -0,0 +1,31 @@ +# Copyright (c) 2016-2019, Ruslan Baratov +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + pip_pylint + VERSION + 2.3.1 + URL + "https://github.com/PyCQA/pylint/archive/pylint-2.3.1.tar.gz" + SHA1 + 9dc2b3825611baeca43d3601f36841aa8cb7ef60 +) + +hunter_cmake_args( + pip_pylint + CMAKE_ARGS + DEPENDS_ON_PACKAGES=pip_astroid +) + +hunter_pick_scheme(DEFAULT url_sha1_pip) +hunter_cacheable(pip_pylint) +hunter_download(PACKAGE_NAME pip_pylint) diff --git a/docs/packages/pkg/pip_pylint.rst b/docs/packages/pkg/pip_pylint.rst new file mode 100644 index 0000000000..d772154c84 --- /dev/null +++ b/docs/packages/pkg/pip_pylint.rst @@ -0,0 +1,21 @@ +.. spelling:: + + pylint + +.. index:: + single: python ; pip_pylint + +.. _pkg.pip_pylint: + +pip_pylint +========== + +- `Official `__ +- `Official GitHub `__ +- `PyPI `__ +- `Example `__ + +.. literalinclude:: /../examples/pip_pylint/CMakeLists.txt + :language: cmake + :start-after: # DOCUMENTATION_START { + :end-before: # DOCUMENTATION_END } diff --git a/examples/pip_pylint/CMakeLists.txt b/examples/pip_pylint/CMakeLists.txt new file mode 100644 index 0000000000..a7b6717853 --- /dev/null +++ b/examples/pip_pylint/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2016-2019, Ruslan Baratov +# All rights reserved. + +cmake_minimum_required(VERSION 3.12) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-pip_pylint) + +# DOCUMENTATION_START { +hunter_add_package(pip_pylint) +find_package(pip_pylint CONFIG REQUIRED) + +execute_process( + COMMAND + ${Python_EXECUTABLE} -m pylint --help + RESULT_VARIABLE + result +) + +if(NOT result EQUAL "0") + message(FATAL_ERROR "Failed") +endif() +# DOCUMENTATION_END }