summaryrefslogtreecommitdiff
path: root/dev-python/importlib-resources
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/importlib-resources')
-rw-r--r--dev-python/importlib-resources/Manifest3
-rw-r--r--dev-python/importlib-resources/importlib-resources-5.12.0.ebuild46
-rw-r--r--dev-python/importlib-resources/metadata.xml21
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-python/importlib-resources/Manifest b/dev-python/importlib-resources/Manifest
new file mode 100644
index 000000000000..b1f42f30a5e9
--- /dev/null
+++ b/dev-python/importlib-resources/Manifest
@@ -0,0 +1,3 @@
+DIST importlib_resources-5.12.0.tar.gz 39894 BLAKE2B bbae92bd62b54afc0093f8daa8f0fabaf18da7b2c9c578a2e6b6b7cc3207384e4fd037762c4ac8bc862900ac2da112a3b8ae236b1d3ca072c739f2d1ad3edd36 SHA512 00875d82cf3d2103872079ee2882c4000cc65141d97988265721cc6861a64dfe480e5c2191a2b22d0b9b9e42de1fc06d54f6d8eb4f37aaf91a819ee9306dc06f
+EBUILD importlib-resources-5.12.0.ebuild 1233 BLAKE2B 737f5ffd7b10f7d72a95f72c42d365302dd6a6f870897f97d606ffa6ec3fb3d2e4585f0774144c3e2361ccbcb924ced8c29a62ce636f9095678b070066c72101 SHA512 9f4c1710a9741fda1bf3b7eb990894bdff2a73cb8f265f259e1983c6282480e839cf5cf2d3b7cf19bc5272e38d9836d32627bb4ac6c9aec01832e3cf6acc592d
+MISC metadata.xml 839 BLAKE2B ca4c02fdd3da2595a0011a145cf06f5401b6a5bf7381d23db7896a8ee63763bcf01d67a65e819e03f9aded78c8237e4c8e11fd836b8585fc4ed765572eb1e931 SHA512 3032eb1ae6322ee29a95c93fdd155ffaa4515f5ee27039b19b59c44d0160c7aeb6fb7b8b53a57d74daab8325ffdb15bb776c123afcaafeea6241ae67f55675cb
diff --git a/dev-python/importlib-resources/importlib-resources-5.12.0.ebuild b/dev-python/importlib-resources/importlib-resources-5.12.0.ebuild
new file mode 100644
index 000000000000..d1ac2513af5f
--- /dev/null
+++ b/dev-python/importlib-resources/importlib-resources-5.12.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_PEP517=flit
+# This is a backport of importlib.resources that's present since py3.9.
+# However, the version in 3.9 is buggy, so matplotlib needs it on 3.9
+# as well.
+PYTHON_COMPAT=( pypy3 python3_9 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Read resources from Python packages"
+HOMEPAGE="
+ https://github.com/python/importlib_resources/
+ https://pypi.org/project/importlib-resources/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~x64-solaris"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/zipp-3.7.0-r1[${PYTHON_USEDEP}]
+ ' 3.8 3.9)
+"
+
+distutils_enable_tests unittest
+
+src_configure() {
+ grep -q 'build-backend = "setuptools' pyproject.toml ||
+ die "Upstream changed build-backend, recheck"
+ # write a custom pyproject.toml to ease setuptools bootstrap
+ cat > pyproject.toml <<-EOF || die
+ [build-system]
+ requires = ["flit_core >=3.2,<4"]
+ build-backend = "flit_core.buildapi"
+
+ [project]
+ name = "importlib_resources"
+ version = "${PV}"
+ description = "Read resources from Python packages"
+ EOF
+}
diff --git a/dev-python/importlib-resources/metadata.xml b/dev-python/importlib-resources/metadata.xml
new file mode 100644
index 000000000000..705cf06b9e86
--- /dev/null
+++ b/dev-python/importlib-resources/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <longdescription>
+ Backport of Python standard library importlib.resources module
+ for Python 2.7, and 3.4 through 3.8. Users of Python 3.9 and beyond
+ should use the standard library module, since for these versions,
+ importlib_resources just delegates to that module.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">python/importlib_resources</remote-id>
+ <remote-id type="pypi">importlib-resources</remote-id>
+ <bugs-to>https://github.com/python/importlib_resources/issues</bugs-to>
+ <doc>https://importlib-resources.readthedocs.io/</doc>
+ </upstream>
+</pkgmetadata>