diff options
author | Stefan Wagner <stw@bit-strickerei.de> | 2018-08-12 01:02:05 +0200 |
---|---|---|
committer | Andy Postnikov <apostnikov@gmail.com> | 2018-11-04 23:02:06 +0200 |
commit | f7235799e13cda020e66e960485671ca5846d5e3 (patch) | |
tree | d292777503b644f888bae99ecb52aefebe15a120 /testing/py-html5lib | |
parent | 883f72c4bb978813da1a12dc68925124f427a395 (diff) | |
download | aports-f7235799e13cda020e66e960485671ca5846d5e3.tar.bz2 aports-f7235799e13cda020e66e960485671ca5846d5e3.tar.xz |
testing/py-html5lib: upgrade to 1.0.1
Diffstat (limited to 'testing/py-html5lib')
-rw-r--r-- | testing/py-html5lib/APKBUILD | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/testing/py-html5lib/APKBUILD b/testing/py-html5lib/APKBUILD index 79bf385fc0..b54c9825ad 100644 --- a/testing/py-html5lib/APKBUILD +++ b/testing/py-html5lib/APKBUILD @@ -1,41 +1,56 @@ # Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Contributor: Stefan Wagner <stw@bit-strickerei.de> # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-html5lib _pkgname=html5lib -pkgver=0.999 +pkgver=1.0.1 pkgrel=0 pkgdesc="A Python HTML parser" url="https://github.com/html5lib/html5lib-python" arch="noarch" license="MIT" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +depends="py-webencodings" +checkdepends="pytest pytest-expect py-mock" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir"/$_pkgname-$pkgver -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build } -build() { - cd "$_builddir" - python2 setup.py build || return 1 +check() { + cd "$builddir" + py.test-2 + py.test-3 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + 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" } -md5sums="acb8ba4d6db5637360a07859192eb7f8 html5lib-0.999.tar.gz" -sha256sums="c3887f7e2875d7666107fa8bee761ff95b9391acdcc7cd1b5fd57a23b5fbc49e html5lib-0.999.tar.gz" -sha512sums="12f187905510c621714c2b75c6a91cc0cbf8a790da1c715a51d08879704b55cd1c152fa236c0d8f6c8a578555103217a91a64a1af1962d02f4a656040a90bcea html5lib-0.999.tar.gz" +sha512sums="35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2 html5lib-1.0.1.tar.gz" |