mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
# 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=1.0.1
|
|
pkgrel=0
|
|
pkgdesc="A Python HTML parser"
|
|
url="https://github.com/html5lib/html5lib-python"
|
|
arch="noarch"
|
|
license="MIT"
|
|
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
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
python2 setup.py build
|
|
python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
py.test-2
|
|
py.test-3
|
|
}
|
|
|
|
package() {
|
|
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"
|
|
}
|
|
|
|
sha512sums="35939b4450893864da04e735ee5e0addacf1dd34bae6a6909c76572abf6bfded446a78a713dfde91c1485ba45867d7abeb6a45cf0545c16ea968707be7de5dd2 html5lib-1.0.1.tar.gz"
|