From 236302aac694377916670b7769f941e3f1dd0bbc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 26 Jan 2023 19:56:43 +0000 Subject: gentoo auto-resync : 26:01:2023 - 19:56:42 --- dev-python/pylama/Manifest | 3 +- dev-python/pylama/files/pylama-8.4.1-tomli.patch | 69 ++++++++++++++++++++++++ dev-python/pylama/pylama-8.4.1-r1.ebuild | 54 +++++++++++++++++++ dev-python/pylama/pylama-8.4.1.ebuild | 42 --------------- 4 files changed, 125 insertions(+), 43 deletions(-) create mode 100644 dev-python/pylama/files/pylama-8.4.1-tomli.patch create mode 100644 dev-python/pylama/pylama-8.4.1-r1.ebuild delete mode 100644 dev-python/pylama/pylama-8.4.1.ebuild (limited to 'dev-python/pylama') diff --git a/dev-python/pylama/Manifest b/dev-python/pylama/Manifest index 9520a517796b..0440a6e5f5e8 100644 --- a/dev-python/pylama/Manifest +++ b/dev-python/pylama/Manifest @@ -1,3 +1,4 @@ +AUX pylama-8.4.1-tomli.patch 2304 BLAKE2B 5e8a3c9ba4d8ac2965dc60198ee72fd29293330a9b0c643fa49e7fcd0515c3448b8a3cb75b164b014b5d6117486304f17c8736d46cf3aa6f586708427678a1f3 SHA512 fd1449d6f893a19194f84a3bb6b0c77d34e624900c3f10ec24989e9e09c66dfb6ae4d93faa63b131d0a0e53d50e8a880ca33f039f378b7d5ddf844d9d29b5dc8 DIST pylama-8.4.1.gh.tar.gz 37850 BLAKE2B dea99fc784736f3b229c5d82a59f2e2b5490fbe344ad98167e30e550b6c774c7b42cbddfedeb073d9d843cf53169c441812974036b06088ab07d7b7996def4a5 SHA512 fb038c39a2e962bd065ac5ef545f1be50f5b230141141a55e1701ffdc6a241b5778613ac91f29ff648b7ce48fa969c3961a11b7e906b6e350c84b57eea5369cd -EBUILD pylama-8.4.1.ebuild 1052 BLAKE2B 3c73c736be7c5e644695492ea3c575b458fc2940e1b2c87366ead73064a6fe3d6536d1f86b694a4cc72ab72e776dc3bfd7952cf5ae42c454f5b8b0bbd2b58533 SHA512 51d8b0352b54ba5bb519d8ee754fbb357209e6a23e5f20a705ec3a8f05fbcc86836534e892e43d1183947e04f44f7abec17a07f3d50fc4908cd19e6c5c12bcd7 +EBUILD pylama-8.4.1-r1.ebuild 1183 BLAKE2B 2353167f0242c6d53c82444da8dc7e78f8e327ad5485748917f2c860a766b33ef465f0a2a2fd92902a86cbf5b22ec6bde89eaf14556546f4bd62c60b66515957 SHA512 fea808047e325c200c2eabf2802ed5039595bf7bb9aefee1304b81bb66e19e57ce9de4747687600b2f9dc6464144b2c404f83f7fe842ab578239d613f5f012c5 MISC metadata.xml 490 BLAKE2B 4c0dda4b057901937d4b6af02041edc0544e392ade5a3497de0d58ba5c1423332e6c1f0b289a3bbbdcccc1b45eedc01f158778e99f9a6f3911cb6b91d999519d SHA512 d3dc1fdaee046554de697e6aeb324910199ea9329a57ac89cebc96f2143e4d2482e31cadc5df16893fcd012058282f600fef676992d8dd55dba3f045f69bc52b diff --git a/dev-python/pylama/files/pylama-8.4.1-tomli.patch b/dev-python/pylama/files/pylama-8.4.1-tomli.patch new file mode 100644 index 000000000000..291bc9f530e7 --- /dev/null +++ b/dev-python/pylama/files/pylama-8.4.1-tomli.patch @@ -0,0 +1,69 @@ +From 8b7908fec960a05af0a0a9b10d24ed458fcf97c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Tue, 8 Nov 2022 14:33:59 +0100 +Subject: [PATCH] Use tomli/tomllib instead of the unmaintained toml package + +Replace the use of the unmaintained `toml` package with the modern +alternatives: the built-in `tomllib` in Python 3.11+, and its equivalent +`tomli` in older Python versions. `tomli` installs type stubs, so there +is no need for an additional `types-*` package for it. +--- + pylama/config_toml.py | 9 +++++++-- + requirements/requirements-tests.txt | 3 +-- + setup.py | 2 +- + 3 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/pylama/config_toml.py b/pylama/config_toml.py +index 2af02a5..ea6e17a 100644 +--- a/pylama/config_toml.py ++++ b/pylama/config_toml.py +@@ -1,16 +1,21 @@ + """Pylama TOML configuration.""" + +-import toml ++import sys + + from pylama.libs.inirama import Namespace as _Namespace + ++if sys.version_info >= (3, 11): ++ import tomllib ++else: ++ import tomli as tomllib ++ + + class Namespace(_Namespace): + """Inirama-style wrapper for TOML config.""" + + def parse(self, source: str, update: bool = True, **params): + """Parse TOML source as string.""" +- content = toml.loads(source) ++ content = tomllib.loads(source) + tool = content.get("tool", {}) + pylama = tool.get("pylama", {}) + linters = pylama.pop("linter", {}) +diff --git a/requirements/requirements-tests.txt b/requirements/requirements-tests.txt +index d786f1f..e62ccae 100644 +--- a/requirements/requirements-tests.txt ++++ b/requirements/requirements-tests.txt +@@ -5,8 +5,7 @@ radon >= 5.1.0 + mypy + pylint >= 2.11.1 + pylama-quotes +-toml ++tomli >= 1.2.3 ; python_version < "3.11" + vulture + + types-setuptools +-types-toml +diff --git a/setup.py b/setup.py +index 911aea6..6d0222b 100644 +--- a/setup.py ++++ b/setup.py +@@ -21,6 +21,6 @@ def parse_requirements(path: str) -> "list[str]": + extras_require=dict( + tests=parse_requirements("requirements/requirements-tests.txt"), + all=OPTIONAL_LINTERS, **{linter: [linter] for linter in OPTIONAL_LINTERS}, +- toml="toml>=0.10.2", ++ toml="tomli>=1.2.3; python_version < '3.11'", + ), + ) diff --git a/dev-python/pylama/pylama-8.4.1-r1.ebuild b/dev-python/pylama/pylama-8.4.1-r1.ebuild new file mode 100644 index 000000000000..c1a76432c6e9 --- /dev/null +++ b/dev-python/pylama/pylama-8.4.1-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +DESCRIPTION="Code audit tool for python" +HOMEPAGE=" + https://github.com/klen/pylama/ + https://pypi.org/project/pylama/ +" +SRC_URI=" + https://github.com/klen/pylama/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" + +RDEPEND=" + >=dev-python/mccabe-0.7.0[${PYTHON_USEDEP}] + >=dev-python/pycodestyle-2.9.1[${PYTHON_USEDEP}] + >=dev-python/pydocstyle-6.1.1[${PYTHON_USEDEP}] + >=dev-python/pyflakes-2.5.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/eradicate[${PYTHON_USEDEP}] + dev-python/mypy[${PYTHON_USEDEP}] + dev-python/pylint[${PYTHON_USEDEP}] + dev-python/radon[${PYTHON_USEDEP}] + dev-vcs/git + $(python_gen_cond_dep ' + dev-python/tomli[${PYTHON_USEDEP}] + ' 3.{8..10}) + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-tomli.patch +) + +EPYTEST_DESELECT=( + # not packaged + tests/test_linters.py::test_quotes + tests/test_linters.py::test_vulture +) diff --git a/dev-python/pylama/pylama-8.4.1.ebuild b/dev-python/pylama/pylama-8.4.1.ebuild deleted file mode 100644 index 0d21af8a8555..000000000000 --- a/dev-python/pylama/pylama-8.4.1.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) - -inherit distutils-r1 - -DESCRIPTION="Code audit tool for python" -HOMEPAGE="https://github.com/klen/pylama" -SRC_URI="https://github.com/klen/pylama/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" - -RDEPEND=" - >=dev-python/mccabe-0.7.0[${PYTHON_USEDEP}] - >=dev-python/pycodestyle-2.9.1[${PYTHON_USEDEP}] - >=dev-python/pydocstyle-6.1.1[${PYTHON_USEDEP}] - >=dev-python/pyflakes-2.5.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/eradicate[${PYTHON_USEDEP}] - dev-python/mypy[${PYTHON_USEDEP}] - dev-python/pylint[${PYTHON_USEDEP}] - dev-python/radon[${PYTHON_USEDEP}] - dev-python/toml[${PYTHON_USEDEP}] - dev-vcs/git - ) -" - -distutils_enable_tests pytest - -EPYTEST_DESELECT=( - # not packaged - tests/test_linters.py::test_quotes - tests/test_linters.py::test_vulture -) -- cgit v1.2.3