summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-26 19:56:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-26 19:56:43 +0000
commit236302aac694377916670b7769f941e3f1dd0bbc (patch)
tree0a81f35a6120e176fc267d7ad981d4734d85c8ba /dev-python
parent7267fb40fb51ddbc9cc5c1c82b0a12807ef7b281 (diff)
gentoo auto-resync : 26:01:2023 - 19:56:42
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/Manifest.gzbin259315 -> 259301 bytes
-rw-r--r--dev-python/pylama/Manifest3
-rw-r--r--dev-python/pylama/files/pylama-8.4.1-tomli.patch69
-rw-r--r--dev-python/pylama/pylama-8.4.1-r1.ebuild (renamed from dev-python/pylama/pylama-8.4.1.ebuild)18
-rw-r--r--dev-python/sip/Manifest3
-rw-r--r--dev-python/sip/files/sip-6.7.5-tomli.patch93
-rw-r--r--dev-python/sip/sip-6.7.5-r1.ebuild (renamed from dev-python/sip/sip-6.7.5.ebuild)14
7 files changed, 193 insertions, 7 deletions
diff --git a/dev-python/Manifest.gz b/dev-python/Manifest.gz
index be7419f74114..71f35748d9c7 100644
--- a/dev-python/Manifest.gz
+++ b/dev-python/Manifest.gz
Binary files differ
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?= <mgorny@gentoo.org>
+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.ebuild b/dev-python/pylama/pylama-8.4.1-r1.ebuild
index 0d21af8a8555..c1a76432c6e9 100644
--- a/dev-python/pylama/pylama-8.4.1.ebuild
+++ b/dev-python/pylama/pylama-8.4.1-r1.ebuild
@@ -9,8 +9,14 @@ 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"
+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"
@@ -28,13 +34,19 @@ BDEPEND="
dev-python/mypy[${PYTHON_USEDEP}]
dev-python/pylint[${PYTHON_USEDEP}]
dev-python/radon[${PYTHON_USEDEP}]
- dev-python/toml[${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
diff --git a/dev-python/sip/Manifest b/dev-python/sip/Manifest
index a32d2c74a562..31ea5d29ab35 100644
--- a/dev-python/sip/Manifest
+++ b/dev-python/sip/Manifest
@@ -1,6 +1,7 @@
AUX sip-4.18-darwin.patch 1187 BLAKE2B a3cd0418de90e7377bc2ae1206f4620c6be379a3bd38f22c19256b06f5ba0c90ff07f34dcc8d2f44a25244e11544176a5e1b91049d220bd56cc7b3876a26ba76 SHA512 1afe049fd21f0e8e5118dec4d4b74851cd5e2c75a66a93e1a79a42267954b1edfcff9644696c7d98342499fb27fde727a554b5739cbd791d17a0e319c1dddb7e
+AUX sip-6.7.5-tomli.patch 2828 BLAKE2B fae02d3702df75164028298d342b81a5416381d53f33ab9f21604abe55fdbf30b717629b0e9794a7063abb4f74892d7367065b661b5a84def0a387655eebc5cb SHA512 578c980d924f3082b5fe865f4acb044fdea5c5d0d2e7b644446b52370a447500732727b33d2b239b8faaa271f3da554060e74e68263e4c11b15860e56e132139
DIST sip-4.19.25.tar.gz 1056384 BLAKE2B f92e105e6b30e871aea2883dc9cd459e4032fb139a9eaff153a3412a66b39df4d7ac985711a2693aee83195ff3850ae648bee4102f7fc3cc30d09885799f2b98 SHA512 60fb4133c68869bf0993144978b4847d94a0f9c7b477f64a346ea133cfe35bc11820204ab327dcf9a929b6f65a26d16cc7efbce65e49967c3347b39376e57001
DIST sip-6.7.5.tar.gz 1160691 BLAKE2B 64572687e026854c3e8ba7de637925f13a880e51e574993e37190b9b1fafa1850da686600a652bab9d399f58516e2c4e4d8a93f5fb13d53a12ecc5ec3885a98c SHA512 2dc38a6c0489e374a016b7db1f9443bb5d2fb29dc1fa7647ed2dd5bb4aa8758586e2b85569f9fb3b992e15eded0f7a783ec1a53b3d18bee3f8be53d43b79b7b9
EBUILD sip-4.19.25-r1.ebuild 2275 BLAKE2B 3b74d08ad36c71fff2d6982548870f14a1425903d94fcd86a21788bae8f9f0c30485846fe49f0aba13843d0764f421be133ec1a14d5e38f65b61a0a889155b25 SHA512 fa4b11a80372b8c9abf0a5c6b4ceb5b41f998342cd997a856b38f52e07e3c89524bdcfa6539dccd207bb03cfac231a7231304162c2984795d962ad10c88cfda1
-EBUILD sip-6.7.5.ebuild 981 BLAKE2B e3660796fb4b64be72a793dbafce88bc0c6ef9973f61cc82a0733a46f3d04f447b5eb8a758c0449dcdca0acf797caed644f96fa52bf75a9c5ba653b60f0e15a3 SHA512 ba2bbb6fb7a4cb32e57b1cdf4212f254bb88c2ccfaba796ecdb1fc12d773d3b1837ad22f4c0072f47564053a52354d0fb746786a9c57b9265ca922450f7ac57b
+EBUILD sip-6.7.5-r1.ebuild 1072 BLAKE2B 47a191feced8dfc25164c5ae4bf00e10b8eff6d871bb76808e888906e733a4c8826b1ad085f876251a8ac9098c035ba555c37d37ed4b575aa1529d14fd03f374 SHA512 753cc54678dc5b9fde5b4edd24f52b222bd3f3f390ddb0eeb35ee38d2975e23118721b28785fc5a0d878141df1cab3e5a224dfa592749338295d2173adf4b269
MISC metadata.xml 639 BLAKE2B deb4a3e534eaa966db932dc17bf7df6a04ed41ce707dc7f1befb272c362be06f222f976c4b0d526a6190d4954f1fa0e2c94ccc2e6cfceff6e8db5959e653fed1 SHA512 8c8e45d32587e346d4df067950aacbc767618418d42f4a5bf48a62706c9612007915ec643dc9fe7b7d083696b26795abb76d9cc475481c26782874f5116863a1
diff --git a/dev-python/sip/files/sip-6.7.5-tomli.patch b/dev-python/sip/files/sip-6.7.5-tomli.patch
new file mode 100644
index 000000000000..c785e41f265a
--- /dev/null
+++ b/dev-python/sip/files/sip-6.7.5-tomli.patch
@@ -0,0 +1,93 @@
+diff --git a/setup.py b/setup.py
+index 586606d..312a431 100644
+--- a/setup.py
++++ b/setup.py
+@@ -51,7 +51,7 @@ setup(
+ version=version,
+ license='SIP',
+ python_requires='>=3.7',
+- install_requires=['packaging', 'ply', 'setuptools', 'toml'],
++ install_requires=['packaging', 'ply', 'setuptools', 'tomli; python_version<"3.11"'],
+ packages=find_packages(),
+ package_data={
+ 'sipbuild.module': ['source/*/*'],
+diff --git a/sip.egg-info/requires.txt b/sip.egg-info/requires.txt
+index b465c08..8547535 100644
+--- a/sip.egg-info/requires.txt
++++ b/sip.egg-info/requires.txt
+@@ -1,4 +1,4 @@
+ packaging
+ ply
+ setuptools
+-toml
++tomli; python_version<"3.11"
+diff --git a/sipbuild/bindings_configuration.py b/sipbuild/bindings_configuration.py
+index 8197e27..a942f3f 100644
+--- a/sipbuild/bindings_configuration.py
++++ b/sipbuild/bindings_configuration.py
+@@ -22,11 +22,16 @@
+
+
+ import os
+-import toml
++import sys
+
+ from .exceptions import UserFileException, UserParseException
+ from .module import resolve_abi_version
+
++if sys.version_info >= (3, 11):
++ import tomllib
++else:
++ import tomli as tomllib
++
+
+ def get_bindings_configuration(abi_major, sip_file, sip_include_dirs):
+ """ Get the configuration of a set of bindings. """
+@@ -47,7 +52,8 @@ def get_bindings_configuration(abi_major, sip_file, sip_include_dirs):
+
+ # Read the configuration.
+ try:
+- cfg = toml.load(toml_file)
++ with open(toml_file, "rb") as f:
++ cfg = tomllib.load(f)
+ except Exception as e:
+ raise UserParseException(toml_file, detail=str(e))
+
+diff --git a/sipbuild/pyproject.py b/sipbuild/pyproject.py
+index 1ba2223..6e4a7c6 100644
+--- a/sipbuild/pyproject.py
++++ b/sipbuild/pyproject.py
+@@ -22,11 +22,16 @@
+
+
+ from collections import OrderedDict
+-import toml
++import sys
+
+ from .exceptions import UserFileException
+ from .py_versions import OLDEST_SUPPORTED_MINOR
+
++if sys.version_info >= (3, 11):
++ import tomllib
++else:
++ import tomli as tomllib
++
+
+ class PyProjectException(UserFileException):
+ """ An exception related to a pyproject.toml file. """
+@@ -69,7 +74,8 @@ class PyProject:
+ self.toml_error = None
+
+ try:
+- self._pyproject = toml.load('pyproject.toml', _dict=OrderedDict)
++ with open('pyproject.toml', 'rb') as f:
++ self._pyproject = tomllib.load(f)
+ except FileNotFoundError:
+ self.toml_error = "there is no such file in the current directory"
+ except Exception as e:
+@@ -174,4 +180,4 @@ class PyProject:
+ def _is_section(value):
+ """ Returns True if a section value is itself a section. """
+
+- return isinstance(value, (OrderedDict, list))
++ return isinstance(value, (OrderedDict, dict, list))
diff --git a/dev-python/sip/sip-6.7.5.ebuild b/dev-python/sip/sip-6.7.5-r1.ebuild
index 139b26e4f7c4..a839024c9fa8 100644
--- a/dev-python/sip/sip-6.7.5.ebuild
+++ b/dev-python/sip/sip-6.7.5-r1.ebuild
@@ -5,10 +5,14 @@ EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
DISTUTILS_USE_PEP517=setuptools
+
inherit distutils-r1
DESCRIPTION="Python bindings generator for C/C++ libraries"
-HOMEPAGE="https://www.riverbankcomputing.com/software/sip/ https://pypi.org/project/sip/"
+HOMEPAGE="
+ https://www.riverbankcomputing.com/software/sip/
+ https://pypi.org/project/sip/
+"
MY_P=${PN}-${PV/_pre/.dev}
if [[ ${PV} == *_pre* ]]; then
@@ -28,7 +32,13 @@ RDEPEND="
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/ply[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
- dev-python/toml[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/tomli[${PYTHON_USEDEP}]
+ ' 3.{8..10})
"
distutils_enable_sphinx doc --no-autodoc
+
+PATCHES=(
+ "${FILESDIR}"/${P}-tomli.patch
+)