diff options
| author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-05-02 12:50:04 -0400 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-05-12 10:33:54 -0700 |
| commit | 7a75c2d6b4334ee7701158bdd63e8c5acbe3125f (patch) | |
| tree | ddf25aa613d62f0c5704ddb54338785a07268a9e | |
| parent | b9b6308f3d2c6a75bd1b71dce5b475efe292c85d (diff) | |
| download | meta-openembedded-7a75c2d6b4334ee7701158bdd63e8c5acbe3125f.tar.gz | |
python3-pylint: add ptest
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 32 insertions, 11 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pylint/0001-pyproject.toml-Remove-hard-coded-dependencies.patch b/meta-python/recipes-devtools/python/python3-pylint/0001-pyproject.toml-Remove-hard-coded-dependencies.patch index 55d42b1016..267e4c30dd 100644 --- a/meta-python/recipes-devtools/python/python3-pylint/0001-pyproject.toml-Remove-hard-coded-dependencies.patch +++ b/meta-python/recipes-devtools/python/python3-pylint/0001-pyproject.toml-Remove-hard-coded-dependencies.patch | |||
| @@ -1,21 +1,15 @@ | |||
| 1 | From 843d050f1bf889b81fa8fc3e7a1350385c8348ec Mon Sep 17 00:00:00 2001 | 1 | From c5c415a240189ac6730ba95de0bb5883dfb53609 Mon Sep 17 00:00:00 2001 |
| 2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
| 3 | Date: Mon, 1 May 2023 11:32:24 -0400 | 3 | Date: Mon, 1 May 2023 11:32:24 -0400 |
| 4 | Subject: [PATCH] pyproject.toml: Remove hard-coded dependencies | 4 | Subject: [PATCH] pyproject.toml: Remove hard-coded dependencies |
| 5 | 5 | ||
| 6 | The upstream pyproject.toml has hard-coded dependencies on specific | ||
| 7 | versions of wheel and setuptools. This breaks builds of pylint | ||
| 8 | 2.17.3, so patch it to remove the pinned versions. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
| 13 | --- | 7 | --- |
| 14 | pyproject.toml | 2 +- | 8 | pyproject.toml | 2 +- |
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | 10 | ||
| 17 | diff --git a/pyproject.toml b/pyproject.toml | 11 | diff --git a/pyproject.toml b/pyproject.toml |
| 18 | index e4b63c660..0ee21e0eb 100644 | 12 | index bd542646b..2c0ed9485 100644 |
| 19 | --- a/pyproject.toml | 13 | --- a/pyproject.toml |
| 20 | +++ b/pyproject.toml | 14 | +++ b/pyproject.toml |
| 21 | @@ -1,5 +1,5 @@ | 15 | @@ -1,5 +1,5 @@ |
diff --git a/meta-python/recipes-devtools/python/python3-pylint/run-ptest b/meta-python/recipes-devtools/python/python3-pylint/run-ptest new file mode 100644 index 0000000000..b63c4de0d9 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pylint/run-ptest | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' | ||
diff --git a/meta-python/recipes-devtools/python/python3-pylint_2.17.3.bb b/meta-python/recipes-devtools/python/python3-pylint_2.17.3.bb index b85f77503d..58f0616fcd 100644 --- a/meta-python/recipes-devtools/python/python3-pylint_2.17.3.bb +++ b/meta-python/recipes-devtools/python/python3-pylint_2.17.3.bb | |||
| @@ -3,10 +3,14 @@ HOMEPAGE= "http://www.pylint.org/" | |||
| 3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" |
| 5 | 5 | ||
| 6 | SRC_URI += "file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch" | 6 | SRC_URI += " \ |
| 7 | SRC_URI[sha256sum] = "761907349e699f8afdcd56c4fe02f3021ab5b3a0fc26d19a9bfdc66c7d0d5cd5" | 7 | git://github.com/pylint-dev/pylint;branch=main;protocol=https \ |
| 8 | file://run-ptest \ | ||
| 9 | file://0001-pyproject.toml-Remove-hard-coded-dependencies.patch \ | ||
| 10 | " | ||
| 11 | SRCREV ?= "389e14c36819cb87190fd412d3f366a3283f0078" | ||
| 8 | 12 | ||
| 9 | inherit pypi python_setuptools_build_meta | 13 | inherit python_setuptools_build_meta ptest |
| 10 | 14 | ||
| 11 | RDEPENDS:${PN} += "${PYTHON_PN}-astroid \ | 15 | RDEPENDS:${PN} += "${PYTHON_PN}-astroid \ |
| 12 | ${PYTHON_PN}-isort \ | 16 | ${PYTHON_PN}-isort \ |
| @@ -17,3 +21,23 @@ RDEPENDS:${PN} += "${PYTHON_PN}-astroid \ | |||
| 17 | ${PYTHON_PN}-difflib \ | 21 | ${PYTHON_PN}-difflib \ |
| 18 | ${PYTHON_PN}-netserver \ | 22 | ${PYTHON_PN}-netserver \ |
| 19 | " | 23 | " |
| 24 | |||
| 25 | RDEPENDS:${PN}-ptest += " \ | ||
| 26 | ${PYTHON_PN}-core \ | ||
| 27 | ${PYTHON_PN}-dill \ | ||
| 28 | ${PYTHON_PN}-git \ | ||
| 29 | ${PYTHON_PN}-platformdirs \ | ||
| 30 | ${PYTHON_PN}-pytest \ | ||
| 31 | ${PYTHON_PN}-pytest-benchmark \ | ||
| 32 | ${PYTHON_PN}-statistics \ | ||
| 33 | ${PYTHON_PN}-tomlkit \ | ||
| 34 | ${PYTHON_PN}-tomllib \ | ||
| 35 | " | ||
| 36 | |||
| 37 | S = "${WORKDIR}/git" | ||
| 38 | |||
| 39 | do_install_ptest() { | ||
| 40 | install -d ${D}${PTEST_PATH}/tests | ||
| 41 | cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ | ||
| 42 | sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript | ||
| 43 | } | ||
