From 7c9730bcb62df7cbf8248c5db9a478aac52c60ea Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 17 Feb 2023 14:07:47 +0000 Subject: gentoo auto-resync : 17:02:2023 - 14:07:46 --- dev-python/frozendict/Manifest | 2 ++ .../frozendict-2.3.4-optional-extension.patch | 20 +++++++++++ dev-python/frozendict/frozendict-2.3.4-r1.ebuild | 42 ++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 dev-python/frozendict/files/frozendict-2.3.4-optional-extension.patch create mode 100644 dev-python/frozendict/frozendict-2.3.4-r1.ebuild (limited to 'dev-python/frozendict') diff --git a/dev-python/frozendict/Manifest b/dev-python/frozendict/Manifest index 2e320a3d3d40..6949a563dc14 100644 --- a/dev-python/frozendict/Manifest +++ b/dev-python/frozendict/Manifest @@ -1,3 +1,5 @@ +AUX frozendict-2.3.4-optional-extension.patch 501 BLAKE2B 42d726955d52bf3c4585ce085407be9026fbec3b2f75825f7b58932c93f6157fc99d2a701b38abc94314220c3b02ba02e531beea3e943e8bf3657fd69d875283 SHA512 d1ef784849a68c47b6b2878a576cf22304b00deb1cc8f6814187f295606325fcb056d41e328472c189b8fa45944cc4751022d18287acb9d641c5ad68ca8c38b6 DIST frozendict-2.3.4.gh.tar.gz 307399 BLAKE2B ac6311182ed2ba4925a14a145b4d30a0241978f55ae7a81cebc534ede812ca77097f0f8c7eeb08e8cbd6240e036d3b5035bd3e9b284a55b638c93717e3a20258 SHA512 15acc4fceb5e2228ee3423d4a5b86c529e9bdcb7264f59139cbde6194983901a17da8036bebf53d7d8057ce52666031e90eb1ca358bfd374c651fd60743988dc +EBUILD frozendict-2.3.4-r1.ebuild 906 BLAKE2B 5588199e3c10b03b863c52cbcbb322aa4142d143f0ab959d8922b8c911f2c667f0c6618039210ca5f96fec858a8b32084db556450d0b7ee5f805a5d820580440 SHA512 8c40f4090f8aa6b4b0761c6f5df2d3469ba2aa3998b13f0fbbe3a85fafac6b99cd3d477361db9d9d67ef263162526b0b5988c20af2e979e331be3b494ae07956 EBUILD frozendict-2.3.4.ebuild 619 BLAKE2B 35b547359779054e3f492babe19f3fc4e64209ef643c23cac4df446878f2c12d1900552599f02ad160c61b6dfde484114e80ce0c75dcbd2cbe7f5acd6842888a SHA512 81787f4fe74eb23914cad4e6e4b0df38e079d6ca6bfc5d3c2e67c28141bbc4278e3ca7b318a7138b236588d174d654756d0865240746946ce6f88703bbdf5caa MISC metadata.xml 634 BLAKE2B 362d9aef54a08943047b2f7b04f74d142be6eb74c74d8242460a70e22a3d77d475f588057fbca3ec6f691f2516a52bc23016e694824d092470670e05e98a79d6 SHA512 7f452c4e377081a16c159ca73079a73666dbd862f237516cb3962bfa7a8c4d32f6c68c7bcd5ef37cade10b999fd026178ca2192bd8254d37da642c9bec81137c diff --git a/dev-python/frozendict/files/frozendict-2.3.4-optional-extension.patch b/dev-python/frozendict/files/frozendict-2.3.4-optional-extension.patch new file mode 100644 index 000000000000..f64402b023e3 --- /dev/null +++ b/dev-python/frozendict/files/frozendict-2.3.4-optional-extension.patch @@ -0,0 +1,20 @@ +Autodetect availability of C extension. Taken from upstream PR. + +Upstream-PR: https://github.com/Marco-Sulla/python-frozendict/pull/69 + +diff --git a/setup.py b/setup.py +index 0325383..0667b59 100755 +--- a/setup.py ++++ b/setup.py +@@ -163,7 +163,7 @@ if len(argv) > 1 and argv[1] in custom_args: + impl = python_implementation() + + if custom_arg == None: +- if impl == "PyPy": ++ if impl == "PyPy" or not src_path.exists(): + custom_arg = "py" + else: + custom_arg = "c" +-- +2.39.1 + diff --git a/dev-python/frozendict/frozendict-2.3.4-r1.ebuild b/dev-python/frozendict/frozendict-2.3.4-r1.ebuild new file mode 100644 index 000000000000..986217d9dcee --- /dev/null +++ b/dev-python/frozendict/frozendict-2.3.4-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022-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="A simple immutable mapping for python" +HOMEPAGE=" + https://github.com/Marco-Sulla/python-frozendict/ + https://pypi.org/project/frozendict/ +" +SRC_URI=" + https://github.com/Marco-Sulla/python-frozendict/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" +S="${WORKDIR}/python-${P}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc64" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}/${P}-optional-extension.patch" +) + +python_test() { + local EPYTEST_IGNORE=() + # skip tests of native extension for python versions where it is not available + [[ ${EPYTHON} == python3.11 ]] && EPYTEST_IGNORE+=( + test/test_frozendict_c.py + test/test_frozendict_c_subclass.py + ) + + rm -rf frozendict || die + epytest +} -- cgit v1.2.3