Files
meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_4.0.7.bb
T
Khem Raj 7aa282b1cc python3-pylint: fix astroid 4.1.2 functional-test fixture mismatches
astroid 4.1.2 (the version this distro packages) changed how it
resolves the enclosing scope/parent name and end_lineno for decorated
functions, singledispatch registrations, positional-only-arg checks
and a few other node kinds. These functional tests were pinned against
an older astroid's output and fail with plain output-text mismatches
(not logic errors) once run against 4.1.2. Regenerated the expected
.txt fixtures against astroid==4.1.2, mirroring the existing
0001-Adjust-test-expectations-for-ptest.patch approach for this
recipe.

tests/functional/u/undefined/undefined_variable.314.txt is pylint's
own Python-3.14-specific override of undefined_variable.txt (see
FunctionalTestFile.expected_output, which prefers a
"<base>.<ver>.txt" file over the plain one when it matches the
running interpreter). The distro's target Python is 3.14.7, so this
file - not the plain .txt - is what actually gets read during ptest,
and it still carried the pre-4.1.2 astroid values for the same two
lines. Applied the identical fix there too.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2026-08-29 21:43:04 -07:00

60 lines
1.9 KiB
BlitzBasic

SUMMARY = "Pylint is a Python source code analyzer"
HOMEPAGE = "https://www.pylint.org/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9"
SRCREV = "c6768d3f1a45fbfad6a4ff9e167ca4f71dd5c991"
SRC_URI += "git://github.com/pylint-dev/pylint;branch=main;protocol=https;tag=v${PV} \
file://0001-Adjust-test-expectations-for-ptest.patch \
file://0002-pyproject.toml-Keep-tool.setuptools.license-files.patch \
file://0003-astroid-4.1.2-endlineno.patch \
file://run-ptest \
"
inherit python_setuptools_build_meta ptest
RDEPENDS:${PN} += "\
python3-astroid \
python3-difflib \
python3-dill \
python3-isort \
python3-json \
python3-mccabe \
python3-netserver \
python3-numbers \
python3-pkgutil \
python3-platformdirs \
python3-shell \
python3-tomlkit \
"
# python3-misc for timeit.py
RDEPENDS:${PN}-ptest += " \
python3-core \
python3-git \
python3-misc \
python3-py \
python3-pytest \
python3-pytest-benchmark \
python3-pytest-runner \
python3-pytest-timeout \
python3-pytest-xdist \
python3-requests \
python3-statistics \
python3-tomllib \
python3-typing-extensions \
python3-unittest-automake-output \
"
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep
sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/a_script
# regression_distutil_import_error_73.py fails to run see
# https://lists.openembedded.org/g/openembedded-devel/topic/103181847
rm ${D}${PTEST_PATH}/tests/functional/r/regression_02/regression_distutil_import_error_73.py
}
BBCLASSEXTEND = "native nativesdk"