# Contributor: Fabian Affolter # Contributor: Orson Teodoro # Maintainer: Fabian Affolter pkgname=py-beautifulsoup4 _pkgname=beautifulsoup4 pkgver=4.6.0 pkgrel=1 pkgdesc="A Python HTML/XML parser" url="http://www.crummy.com/software/BeautifulSoup/index.html" arch="noarch" license="MIT" makedepends="py-setuptools py3-setuptools py-sphinx" subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3 $pkgname-doc" # do not change the order source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz unattended-tests.patch" builddir="$srcdir"/$_pkgname-$pkgver _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" msg "subpkdir is $subpkgdir" $python setup.py build -b $python install --prefix=/usr --root="$subpkgdir" } _py2() { _py python2 } _py3() { cd "$builddir" rm -rf bs4 mv py3k/bs4 bs4 _py python3 } package() { cd "$builddir" install -d "$pkgdir"/usr/share/doc/$pkgname "$pkgdir"/usr/share/man/man1 "$pkgdir"/usr/share/html/$pkgname install -t "$pkgdir"/usr/share/doc/$pkgname AUTHORS.txt README.txt TODO.txt cd doc PYTHONPATH="$builddir/src" make html man install -t "$pkgdir"/usr/share/man/man1 build/man/* mv build/html/* "$pkgdir"/usr/share/html/$pkgname } check() { cd "$builddir" python2 setup.py check python3 setup.py check ./test-all-versions } sha512sums="1a7eee4218e58cc3852e71fe4f0892f673bb46a851941264766a38eff8ef05d612d88b4641fcb478ce8f66ac50dc987ca039923c4bbb11867c74813289f7e578 beautifulsoup4-4.6.0.tar.gz 5651c62b4a989df212c34e54ce84e61367fc4e992df3d50965fd7ed9589683d5b201db6ea60c2c6e90d9fb9c3bac2cb8553092bd571259744d82e0ba0d28f7b2 unattended-tests.patch"