summaryrefslogtreecommitdiff
path: root/user/py3-importlib_resources
diff options
context:
space:
mode:
Diffstat (limited to 'user/py3-importlib_resources')
-rw-r--r--user/py3-importlib_resources/APKBUILD35
-rw-r--r--user/py3-importlib_resources/python3-provides.patch14
2 files changed, 49 insertions, 0 deletions
diff --git a/user/py3-importlib_resources/APKBUILD b/user/py3-importlib_resources/APKBUILD
new file mode 100644
index 000000000..4c6ffa7d4
--- /dev/null
+++ b/user/py3-importlib_resources/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+# FIXME: drop after python3 >= 3.7.0
+pkgname=py3-importlib_resources
+_pkgname=importlib_resources
+_p="${_pkgname#?}"
+_p="${_pkgname%"$_p"}"
+pkgver=1.0.2
+pkgrel=0
+pkgdesc="Backport of Python 3.7's importlib.resources"
+url="https://pypi.python.org/pypi/importlib_resources"
+arch="noarch"
+# Certified net clean
+license="Apache-2.0"
+depends="python3"
+makedepends=""
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/$_p/$_pkgname/$_pkgname-$pkgver.tar.gz
+ python3-provides.patch"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ rm "$builddir"/importlib_resources/_py2.py
+ python3 setup.py test
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="50bfc5130a2c9c9354efef1cd7132e805ed0f13467ba67172f83e11d907212bef3957aeef51fd904b73996c8280008d99c918637956a470448dfd67ef4807f82 py3-importlib_resources-1.0.2.tar.gz
+8e91cfa2e7c59041a038d44c9de559ed757f789515c89d18a786e30bf2f387dddab004e66261b1f33b0ca142013b6b203cfcc990d2757c610302a23d0a9387ab python3-provides.patch"
diff --git a/user/py3-importlib_resources/python3-provides.patch b/user/py3-importlib_resources/python3-provides.patch
new file mode 100644
index 000000000..bd1a1606e
--- /dev/null
+++ b/user/py3-importlib_resources/python3-provides.patch
@@ -0,0 +1,14 @@
+Our python3 package provides these, and it'll choke if it has no network access
+while trying to determine if they're installed
+
+--- importlib_resources-1.0.2/setup.cfg
++++ importlib_resources-1.0.2/setup.cfg
+@@ -18,8 +18,6 @@ classifiers =
+ [options]
+ python_requires = >=2.7,!=3.0,!=3.1,!=3.2,!=3.3
+ setup_requires =
+- setuptools
+- wheel
+ install_requires =
+ pathlib2; python_version < '3'
+ typing; python_version < '3.5'