aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-webencodings
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-02 03:28:54 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-02 07:04:05 -0300
commit785ea11e20ab02ad7dd38aef10ba82aabedc134f (patch)
treec1718a6a9f29793234eabc7b220bd3e8a6269ed0 /testing/py3-webencodings
parent138af89d08877892b24d113dd657a1ac142ec7f6 (diff)
testing/py3-webencodings: rename from py-webencodings
Diffstat (limited to 'testing/py3-webencodings')
-rw-r--r--testing/py3-webencodings/APKBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/py3-webencodings/APKBUILD b/testing/py3-webencodings/APKBUILD
new file mode 100644
index 00000000000..77eeb0a35f5
--- /dev/null
+++ b/testing/py3-webencodings/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Stefan Wagner <stw@bit-strickerei.de>
+pkgname=py-webencodings
+_pkgname=webencodings
+pkgver=0.5.1
+pkgrel=1
+pkgdesc="Character encoding for the web"
+url="https://github.com/gsnedders/python-webencodings"
+arch="noarch"
+license="MIT"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/gsnedders/python-$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/python-$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+sha512sums="c5cb34f35fb5bc7ffb88c19eb3262dedbf6231c0ee2871dccbc0f9497193d8209fc20703d451a2bb41a5ff913e63abf7481f7a8f9886c953724e9cf71c34cb74 webencodings-0.5.1.tar.gz"