From 4ddc4b8afeadd4f572396e00396e7c99b7026647 Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Sun, 14 Jul 2024 22:29:42 +0800 Subject: [PATCH] ipsw-parser: pkgcheck fixes --- dev-python/asn1/asn1-2.7.0.ebuild | 2 +- dev-python/cached-property/Manifest | 1 + .../cached-property-1.5.2.ebuild | 30 ++++ .../cached-property-1.5.1-test-failure.patch | 10 ++ .../cached-property-1.5.2-python311.patch | 142 ++++++++++++++++++ dev-python/cached-property/metadata.xml | 20 +++ dev-python/ipsw-parser/Manifest | 2 +- .../ipsw-parser/ipsw-parser-1.2.1.ebuild | 1 - ...-1.2.0.ebuild => ipsw-parser-1.3.1.ebuild} | 12 +- dev-python/ipsw-parser/metadata.xml | 12 ++ dev-python/pyimg4/Manifest | 2 +- dev-python/pyimg4/metadata.xml | 12 ++ ...{pyimg4-0.8.ebuild => pyimg4-0.8.5.ebuild} | 7 +- dev-python/pyliblzfse/metadata.xml | 12 ++ dev-python/pyliblzfse/pyliblzfse-0.4.1.ebuild | 4 +- dev-python/pylzss/metadata.xml | 11 ++ dev-python/pylzss/pylzss-0.3.1.ebuild | 4 +- 17 files changed, 262 insertions(+), 22 deletions(-) create mode 100644 dev-python/cached-property/Manifest create mode 100644 dev-python/cached-property/cached-property-1.5.2.ebuild create mode 100644 dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch create mode 100644 dev-python/cached-property/files/cached-property-1.5.2-python311.patch create mode 100644 dev-python/cached-property/metadata.xml rename dev-python/ipsw-parser/{ipsw-parser-1.2.0.ebuild => ipsw-parser-1.3.1.ebuild} (78%) create mode 100644 dev-python/ipsw-parser/metadata.xml create mode 100644 dev-python/pyimg4/metadata.xml rename dev-python/pyimg4/{pyimg4-0.8.ebuild => pyimg4-0.8.5.ebuild} (85%) create mode 100644 dev-python/pyliblzfse/metadata.xml create mode 100644 dev-python/pylzss/metadata.xml diff --git a/dev-python/asn1/asn1-2.7.0.ebuild b/dev-python/asn1/asn1-2.7.0.ebuild index aba83e975..79c9afe2a 100644 --- a/dev-python/asn1/asn1-2.7.0.ebuild +++ b/dev-python/asn1/asn1-2.7.0.ebuild @@ -13,6 +13,6 @@ HOMEPAGE="https://github.com/andrivet/python-asn1" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 ~arm64 x86" +KEYWORDS="amd64 arm64 x86" REQUIRED_USE="${PYTHON_REQUIRED_USE}" diff --git a/dev-python/cached-property/Manifest b/dev-python/cached-property/Manifest new file mode 100644 index 000000000..ca1709aea --- /dev/null +++ b/dev-python/cached-property/Manifest @@ -0,0 +1 @@ +DIST cached-property-1.5.2.tar.gz 12244 BLAKE2B 26981dcfa51925741962c60ad8659a165af6d7f242f4abd392932aac20e966ad6c1763a25184bbabdeb5bd75f8063a430c41f0241afdee8013ffcb437b3ff7da SHA512 626d98a8891a70d858269859cf4e49416464c836d073c1331c21033a4cd9e0e47dc89b53bf393375439992f4993972517dc3cdcbb2cc6f8286f282d3c973e600 diff --git a/dev-python/cached-property/cached-property-1.5.2.ebuild b/dev-python/cached-property/cached-property-1.5.2.ebuild new file mode 100644 index 000000000..d596711ff --- /dev/null +++ b/dev-python/cached-property/cached-property-1.5.2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +PYPI_NO_NORMALIZE=1 + +inherit distutils-r1 pypi + +DESCRIPTION="A cached-property for decorating methods in classes" +HOMEPAGE="https://github.com/pydanny/cached-property" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" + +BDEPEND="test? ( dev-python/freezegun[${PYTHON_USEDEP}] )" + +distutils_enable_tests pytest + +DOCS=( {HISTORY,README}.rst ) + +PATCHES=( + # bug 638250 + "${FILESDIR}"/${PN}-1.5.1-test-failure.patch + # @asyncio.coroutine removed in py3.11 + "${FILESDIR}"/${PN}-1.5.2-python311.patch +) diff --git a/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch b/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch new file mode 100644 index 000000000..03fabd290 --- /dev/null +++ b/dev-python/cached-property/files/cached-property-1.5.1-test-failure.patch @@ -0,0 +1,10 @@ +--- a/tests/test_cached_property.py ++++ b/tests/test_cached_property.py +@@ -191,6 +191,7 @@ + self.assert_cached(check, 2) + self.assert_cached(check, 2) + ++ @unittest.skip("Gentoo Bug #638250") + def test_threads_ttl_expiry(self): + Check = CheckFactory(self.cached_property_factory(ttl=100000), threadsafe=True) + check = Check() diff --git a/dev-python/cached-property/files/cached-property-1.5.2-python311.patch b/dev-python/cached-property/files/cached-property-1.5.2-python311.patch new file mode 100644 index 000000000..989033f20 --- /dev/null +++ b/dev-python/cached-property/files/cached-property-1.5.2-python311.patch @@ -0,0 +1,142 @@ +From 297031687679762849dedeaf24aa3a19116f095b Mon Sep 17 00:00:00 2001 +From: Petr Viktorin +Date: Thu, 2 Dec 2021 11:26:20 +0100 +Subject: [PATCH 1/2] Don't use asyncio.coroutinefunction if it's not available + +Python 3.11 drops the deprecated @asyncio.coroutine and +asyncio.iscoroutinefunction. + +Using a wrapper with @asyncio.coroutine in __get__ wasn't +necessary (the future from asyncio.ensure_future is awaitable, +and the wrapper doesn't do anything asynchronous), so the +logic can be simplified to just call asyncio.ensure_future +(to schedule the task and store the result when it's +available). + +Tests for @asyncio.coroutine are skipped on 3.11+. + +An unnecessary call to asyncio.coroutine in tests is +removed: it's not necessary to call this for `async def` +functions. +--- + cached_property.py | 24 +++++++++++------------- + conftest.py | 6 +++++- + tests/test_async_cached_property.py | 3 +-- + 3 files changed, 17 insertions(+), 16 deletions(-) + +diff --git a/cached_property.py b/cached_property.py +index 3135871..254739c 100644 +--- a/cached_property.py ++++ b/cached_property.py +@@ -13,6 +13,12 @@ + import asyncio + except (ImportError, SyntaxError): + asyncio = None ++try: ++ iscoroutinefunction = asyncio.iscoroutinefunction ++except AttributeError: ++ # Python 3.11: @asyncio.coroutine was removed ++ from inspect import iscoroutinefunction ++ + + + class cached_property(object): +@@ -30,22 +36,14 @@ def __get__(self, obj, cls): + if obj is None: + return self + +- if asyncio and asyncio.iscoroutinefunction(self.func): +- return self._wrap_in_coroutine(obj) ++ if asyncio and iscoroutinefunction(self.func): ++ value = asyncio.ensure_future(self.func(obj)) ++ else: ++ value = self.func(obj) + +- value = obj.__dict__[self.func.__name__] = self.func(obj) ++ obj.__dict__[self.func.__name__] = value + return value + +- def _wrap_in_coroutine(self, obj): +- @wraps(obj) +- @asyncio.coroutine +- def wrapper(): +- future = asyncio.ensure_future(self.func(obj)) +- obj.__dict__[self.func.__name__] = future +- return future +- +- return wrapper() +- + + class threaded_cached_property(object): + """ +diff --git a/conftest.py b/conftest.py +index 0563f64..1c4b618 100644 +--- a/conftest.py ++++ b/conftest.py +@@ -7,13 +7,17 @@ + # Whether the async and await keywords work + has_async_await = sys.version_info[0] == 3 and sys.version_info[1] >= 5 + ++# Whether "from asyncio import coroutine" *fails* ++version_info = sys.version_info ++dropped_asyncio_coroutine = version_info[0] == 3 and version_info[1] >= 11 ++ + + print("conftest.py", has_asyncio, has_async_await) + + + collect_ignore = [] + +-if not has_asyncio: ++if not has_asyncio or dropped_asyncio_coroutine: + collect_ignore.append("tests/test_coroutine_cached_property.py") + + if not has_async_await: +diff --git a/tests/test_async_cached_property.py b/tests/test_async_cached_property.py +index 4ba84f3..d61cc28 100644 +--- a/tests/test_async_cached_property.py ++++ b/tests/test_async_cached_property.py +@@ -9,8 +9,7 @@ + + def unittest_run_loop(f): + def wrapper(*args, **kwargs): +- coro = asyncio.coroutine(f) +- future = coro(*args, **kwargs) ++ future = f(*args, **kwargs) + loop = asyncio.get_event_loop() + loop.run_until_complete(future) + + +From 9b210d12fa73c91743378ba4a966417846e7ea9a Mon Sep 17 00:00:00 2001 +From: Petr Viktorin +Date: Thu, 2 Dec 2021 11:44:18 +0100 +Subject: [PATCH 2/2] Restore compatibility with python 2.7 + +This is still necessary according to the Contributing Guidelines. +--- + cached_property.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/cached_property.py b/cached_property.py +index 254739c..944e2f5 100644 +--- a/cached_property.py ++++ b/cached_property.py +@@ -13,12 +13,12 @@ + import asyncio + except (ImportError, SyntaxError): + asyncio = None +-try: +- iscoroutinefunction = asyncio.iscoroutinefunction +-except AttributeError: +- # Python 3.11: @asyncio.coroutine was removed +- from inspect import iscoroutinefunction +- ++if asyncio: ++ try: ++ iscoroutinefunction = asyncio.iscoroutinefunction ++ except AttributeError: ++ # Python 3.11: @asyncio.coroutine was removed ++ from inspect import iscoroutinefunction + + + class cached_property(object): diff --git a/dev-python/cached-property/metadata.xml b/dev-python/cached-property/metadata.xml new file mode 100644 index 000000000..63000918d --- /dev/null +++ b/dev-python/cached-property/metadata.xml @@ -0,0 +1,20 @@ + + + + + spiderx@spiderx.dp.ua + Vladimir Pavljuchenkov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + This package provides a decorator for caching properties in classes to + make caching of time or computational expensive properties quick and easy + + + pydanny/cached-property + cached-property + + diff --git a/dev-python/ipsw-parser/Manifest b/dev-python/ipsw-parser/Manifest index 478cb12f9..48c7c45c7 100644 --- a/dev-python/ipsw-parser/Manifest +++ b/dev-python/ipsw-parser/Manifest @@ -1,2 +1,2 @@ DIST ipsw-parser-1.2.1.tar.gz 46788 BLAKE2B 2d9b13ea5b941655c95ad6f5c45786574e1189b2684fda3b7bea314e15a0976894c44a09f65e4b656c75455b37162d423ea534161e785e683f08fd05de082e3c SHA512 be2a7c0920fb192aeaa698fe8cb42dfab2250654e6fd691e88228855a028b922f69da9360f9838197daa42bbcb8d69adb1f546657924832f1c3ce8be27baa759 -DIST ipsw_parser-1.2.0.tar.gz 46738 BLAKE2B f8ad0dfceca700ff071fd5dc1fc9e8fd137a19d94ca00a6e5c7e050b84a4f41504b114a31b21682db6eb1178c45099bd537758301b4800da4a4f7d0216ae8beb SHA512 847355a39e59bcacc56d6d58662f272a5ada1ef716de5258cc026e9c797f7d79f1f566cf47185e042dc83cb8126be6aa60b1682b3f8109b9ff16c194ef028233 +DIST ipsw_parser-1.3.1.tar.gz 51596 BLAKE2B c3800d0ad6b8bc2dee87ed36b6c4c5584149a9474e2d62e21da04d4824913d974f3ac9f4906ae4682c93d76e2db61579c89508d992fa0ad6cb0a084514753919 SHA512 d3c31480ecc15eaf87282f84268297765ec4629d95adf8d9e78e580e5761b8451ab421fc9d9897c09a1ecc23300301bee36e11d705d639228f50c4c4fe9be7e4 diff --git a/dev-python/ipsw-parser/ipsw-parser-1.2.1.ebuild b/dev-python/ipsw-parser/ipsw-parser-1.2.1.ebuild index 176205e44..bbeaec254 100644 --- a/dev-python/ipsw-parser/ipsw-parser-1.2.1.ebuild +++ b/dev-python/ipsw-parser/ipsw-parser-1.2.1.ebuild @@ -16,7 +16,6 @@ HOMEPAGE="https://github.com/doronz88/ipsw_parser" LICENSE="GPL-3+" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" RDEPEND=">=dev-python/construct-2.9.29[${PYTHON_USEDEP}] dev-python/click[${PYTHON_USEDEP}] diff --git a/dev-python/ipsw-parser/ipsw-parser-1.2.0.ebuild b/dev-python/ipsw-parser/ipsw-parser-1.3.1.ebuild similarity index 78% rename from dev-python/ipsw-parser/ipsw-parser-1.2.0.ebuild rename to dev-python/ipsw-parser/ipsw-parser-1.3.1.ebuild index 89aae2f7f..cdb46340a 100644 --- a/dev-python/ipsw-parser/ipsw-parser-1.2.0.ebuild +++ b/dev-python/ipsw-parser/ipsw-parser-1.3.1.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +#PYPI_NO_NORMALIZE=1 +#PYPI_PN=${PN/_/-} DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..12} ) @@ -14,21 +16,15 @@ HOMEPAGE="https://github.com/doronz88/ipsw_parser" LICENSE="GPL-3+" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" RDEPEND=">=dev-python/construct-2.9.29[${PYTHON_USEDEP}] dev-python/click[${PYTHON_USEDEP}] dev-python/coloredlogs[${PYTHON_USEDEP}] dev-python/cached-property[${PYTHON_USEDEP}] dev-python/plumbum[${PYTHON_USEDEP}] - >=dev-python/pyimg4-0.7[${PYTHON_USEDEP}] + >=dev-python/pyimg4-0.8.5[${PYTHON_USEDEP}] " DEPEND="${RDEPEND}" REQUIRED_USE="${PYTHON_REQUIRED_USE}" #distutils_enable_tests pytest - -src_prepare(){ - sed -i -e 's|rpcclient|ipsw_parser|g' pyproject.toml || die - eapply_user -} diff --git a/dev-python/ipsw-parser/metadata.xml b/dev-python/ipsw-parser/metadata.xml new file mode 100644 index 000000000..bd65c9046 --- /dev/null +++ b/dev-python/ipsw-parser/metadata.xml @@ -0,0 +1,12 @@ + + + + + unknown@pentoo.ch + Author Unknown + + + doronz88/ipsw_parser + ipsw-parser + + diff --git a/dev-python/pyimg4/Manifest b/dev-python/pyimg4/Manifest index 5ba29c43f..8f1880921 100644 --- a/dev-python/pyimg4/Manifest +++ b/dev-python/pyimg4/Manifest @@ -1 +1 @@ -DIST pyimg4-0.8.tar.gz 13967 BLAKE2B c7948280099078906c70003fe16657352e2ea2fa4de447f05b91984668b9f62d4435ae97093a745e524e91d53e271fc69fa31b04f3c43e306f5f3242cf21bc89 SHA512 4d4c035cc9102707b5caea8ee6865e7bd5b6092280ade7e015fe0f5831624c666d00ff9f3538bce5f67b73117e667fdbee28c1a7512f7c72815b3c5bbe0f5838 +DIST pyimg4-0.8.5.tar.gz 14861 BLAKE2B 0b755baaca989f6af7a80afb1fd2db9ee57c11d18abb43e1e3ec7e2a5aecad85781eb406800573277d4222868cf8d00ee21369953944603f12170134c331b50b SHA512 a0bfdd74f45cb800c485de0ed0ec31f7388423e58bce5222d72ece7a5191e51ef69f6a691f97ca6925c71b15c3fa9c411aede7fa502c1c6e1de6cca5b37602c8 diff --git a/dev-python/pyimg4/metadata.xml b/dev-python/pyimg4/metadata.xml new file mode 100644 index 000000000..91c9d01a7 --- /dev/null +++ b/dev-python/pyimg4/metadata.xml @@ -0,0 +1,12 @@ + + + + + unknown@pentoo.ch + Author Unknown + + + m1stadev/PyIMG4 + pyimg4 + + diff --git a/dev-python/pyimg4/pyimg4-0.8.ebuild b/dev-python/pyimg4/pyimg4-0.8.5.ebuild similarity index 85% rename from dev-python/pyimg4/pyimg4-0.8.ebuild rename to dev-python/pyimg4/pyimg4-0.8.5.ebuild index 44961a364..7903c8bcc 100644 --- a/dev-python/pyimg4/pyimg4-0.8.ebuild +++ b/dev-python/pyimg4/pyimg4-0.8.5.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -DISTUTILS_USE_PEP517=poetry +DISTUTILS_USE_PEP517= PYTHON_COMPAT=( python3_{10..12} ) inherit distutils-r1 pypi @@ -13,8 +13,7 @@ HOMEPAGE="https://github.com/m1stadev/PyIMG4" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" -IUSE="" +KEYWORDS="amd64 arm64 x86" RDEPEND=">=dev-python/asn1-2.7.0[${PYTHON_USEDEP}] >=dev-python/click-8.1.7[${PYTHON_USEDEP}] diff --git a/dev-python/pyliblzfse/metadata.xml b/dev-python/pyliblzfse/metadata.xml new file mode 100644 index 000000000..d9f771ad1 --- /dev/null +++ b/dev-python/pyliblzfse/metadata.xml @@ -0,0 +1,12 @@ + + + + + unknown@pentoo.ch + Author Unknown + + + ydkhatri/pyliblzfse + pyliblzfse + + diff --git a/dev-python/pyliblzfse/pyliblzfse-0.4.1.ebuild b/dev-python/pyliblzfse/pyliblzfse-0.4.1.ebuild index 1fe43d3c3..9df0c934d 100644 --- a/dev-python/pyliblzfse/pyliblzfse-0.4.1.ebuild +++ b/dev-python/pyliblzfse/pyliblzfse-0.4.1.ebuild @@ -14,9 +14,7 @@ HOMEPAGE="https://github.com/ydkhatri/pyliblzfse" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 ~arm64 x86" -IUSE="" +KEYWORDS="amd64 arm64 x86" -RDEPEND="" DEPEND="${RDEPEND}" REQUIRED_USE="${PYTHON_REQUIRED_USE}" diff --git a/dev-python/pylzss/metadata.xml b/dev-python/pylzss/metadata.xml new file mode 100644 index 000000000..a805a136b --- /dev/null +++ b/dev-python/pylzss/metadata.xml @@ -0,0 +1,11 @@ + + + + + unknown@pentoo.ch + Author Unknown + + + pylzss + + diff --git a/dev-python/pylzss/pylzss-0.3.1.ebuild b/dev-python/pylzss/pylzss-0.3.1.ebuild index 2312284a7..5ff8db3e1 100644 --- a/dev-python/pylzss/pylzss-0.3.1.ebuild +++ b/dev-python/pylzss/pylzss-0.3.1.ebuild @@ -14,9 +14,7 @@ HOMEPAGE="https://pypi.org/project/pylzss/" LICENSE="GPL-3" SLOT="0" -KEYWORDS="amd64 ~arm64 x86" -IUSE="" +KEYWORDS="amd64 arm64 x86" -RDEPEND="" DEPEND="${RDEPEND}" REQUIRED_USE="${PYTHON_REQUIRED_USE}"