diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 09:43:23 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-07 10:13:45 -0300 |
commit | 1a3e20b7e3f77919e0bfba3359921d1e5e1216e5 (patch) | |
tree | 94412747aa28673a8be00560dc961f0ccb4fb2de /testing/py3-mimeparse | |
parent | 750629aea321b9fab872608180ddbbfd684c13aa (diff) | |
download | aports-1a3e20b7e3f77919e0bfba3359921d1e5e1216e5.tar.bz2 aports-1a3e20b7e3f77919e0bfba3359921d1e5e1216e5.tar.xz |
testing/py3-mimeparse: rename from py-mimeparse
Diffstat (limited to 'testing/py3-mimeparse')
-rw-r--r-- | testing/py3-mimeparse/APKBUILD | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/py3-mimeparse/APKBUILD b/testing/py3-mimeparse/APKBUILD new file mode 100644 index 0000000000..effedb7747 --- /dev/null +++ b/testing/py3-mimeparse/APKBUILD @@ -0,0 +1,49 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Leo <thinkabit.ukim@gmail.com> +pkgname=py-mimeparse +_pkgname=python-mimeparse +pkgver=1.6.0 +pkgrel=0 +pkgdesc="Basic functions for parsing mime-types and matching media-ranges" +url="https://github.com/dbtsai/python-mimeparse" +arch="noarch" +license="MIT" +makedepends="py-setuptools py3-setuptools" +subpackages="py2-mimeparse:_py2 py3-mimeparse:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/dbtsai/python-mimeparse/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + python2 setup.py build + python3 setup.py build +} + +check() { + python2 mimeparse_test.py + python3 mimeparse_test.py +} + +package() { + mkdir -p "$pkgdir" +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +sha512sums="31752e6019be3a766fa429d27eab071bb77e1c812e6a241d8b84838eda206549877fb3369200338a603d4d93fbbbaaa16f6cf47391aeac65675fd271a5f39259 py-mimeparse-1.6.0.tar.gz" |