aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/py-beautifulsoup4/APKBUILD29
1 files changed, 24 insertions, 5 deletions
diff --git a/testing/py-beautifulsoup4/APKBUILD b/testing/py-beautifulsoup4/APKBUILD
index 26dce245b0..809d9678f3 100644
--- a/testing/py-beautifulsoup4/APKBUILD
+++ b/testing/py-beautifulsoup4/APKBUILD
@@ -3,7 +3,7 @@
pkgname=py-beautifulsoup4
_pkgname=beautifulsoup4
pkgver=4.6.0
-pkgrel=0
+pkgrel=1
pkgdesc="A Python HTML/XML parser"
url="http://www.crummy.com/software/BeautifulSoup/index.html"
arch="noarch"
@@ -13,10 +13,29 @@ subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ default_prepare
+
+ local python; for python in python2 python3; do
+ cp -r "$builddir" "$builddir-$python"
+ done
+
+ cd "$builddir-python3"
+ 2to3 -w bs4 >/dev/null
+}
+
build() {
- cd "$builddir"
- python2 setup.py build || return 1
- python3 setup.py build || return 1
+ local python; for python in python2 python3; do
+ cd "$builddir-$python"
+ $python setup.py build
+ done
+}
+
+check() {
+ local python; for python in python2 python3; do
+ cd "$builddir-$python"
+ $python -c "import bs4"
+ done
}
package() {
@@ -40,7 +59,7 @@ _py() {
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
- cd "$builddir"
+ cd "$builddir-$python"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}