# Contributions from Arch: # Maintainer: Jelle van der Waa # Contributor: Eli Schwartz _pkgname=html5-parser pkgbase='python-html5-parser' pkgname=('python3-html5-parser' 'python2-html5-parser') pkgver=0.4.4 pkgrel=1 pkgdesc="Fast C based HTML 5 parsing for python" arch=('x86_64') url="https://github.com/kovidgoyal/${_pkgname}" license=('Apache') makedepends=('python3-chardet' 'python3-lxml' 'python3-setuptools' 'python3' 'python2-chardet' 'python2-lxml' 'python2-setuptools' 'python2') source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"{,.asc}) sha256sums=('b9f3a1d4cdb8742e8e4ecafab04bff541bde4ff09af233293ed0b94028ec1ab5' 'SKIP') validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') build() { cd "${srcdir}/${_pkgname}-${pkgver}" python3 setup.py build python2 setup.py build } package_python3-html5-parser() { depends=('python3-chardet' 'python3-lxml') optdepends=('python3-beautifulsoup4: to use the soup treebuilder') cd "${srcdir}/${_pkgname}-${pkgver}" python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build } package_python2-html5-parser() { depends=('python2-chardet' 'python2-lxml') optdepends=('python2-beautifulsoup4: to use the soup treebuilder') cd "${srcdir}/${_pkgname}-${pkgver}" python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build }