python3-pylint: add ptest

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Trevor Gamblin
2023-05-02 12:50:04 -04:00
committed by Khem Raj
parent b9b6308f3d
commit 7a75c2d6b4
3 changed files with 32 additions and 11 deletions

View File

@@ -3,10 +3,14 @@ HOMEPAGE= "http://www.pylint.org/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9"
SRC_URI += "file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch"
SRC_URI[sha256sum] = "761907349e699f8afdcd56c4fe02f3021ab5b3a0fc26d19a9bfdc66c7d0d5cd5"
SRC_URI += " \
git://github.com/pylint-dev/pylint;branch=main;protocol=https \
file://run-ptest \
file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch \
"
SRCREV ?= "389e14c36819cb87190fd412d3f366a3283f0078"
inherit pypi python_setuptools_build_meta
inherit python_setuptools_build_meta ptest
RDEPENDS:${PN} += "${PYTHON_PN}-astroid \
${PYTHON_PN}-isort \
@@ -17,3 +21,23 @@ RDEPENDS:${PN} += "${PYTHON_PN}-astroid \
${PYTHON_PN}-difflib \
${PYTHON_PN}-netserver \
"
RDEPENDS:${PN}-ptest += " \
${PYTHON_PN}-core \
${PYTHON_PN}-dill \
${PYTHON_PN}-git \
${PYTHON_PN}-platformdirs \
${PYTHON_PN}-pytest \
${PYTHON_PN}-pytest-benchmark \
${PYTHON_PN}-statistics \
${PYTHON_PN}-tomlkit \
${PYTHON_PN}-tomllib \
"
S = "${WORKDIR}/git"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript
}