aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-beautifulsoup4
diff options
context:
space:
mode:
authorOrson Teodoro <orsonteodoro@hotmail.com>2018-02-26 23:25:14 -0800
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-27 21:47:51 +0000
commitf68c680eecf5496b795007438fe641520120219c (patch)
treeb36bd8179e88910cd0b3aaa52ce334bae476385a /testing/py-beautifulsoup4
parent14d028ef5e2f505291dbd744eb71b81cfc11d736 (diff)
downloadaports-f68c680eecf5496b795007438fe641520120219c.tar.bz2
aports-f68c680eecf5496b795007438fe641520120219c.tar.xz
testing/py-beautifulsoup4: fixes
Fix python3 module generation Generate documentation Add check() and run testsuite Remove build() add py-sphinx to makedepends=
Diffstat (limited to 'testing/py-beautifulsoup4')
-rw-r--r--testing/py-beautifulsoup4/APKBUILD52
-rw-r--r--testing/py-beautifulsoup4/unattended-tests.patch16
2 files changed, 47 insertions, 21 deletions
diff --git a/testing/py-beautifulsoup4/APKBUILD b/testing/py-beautifulsoup4/APKBUILD
index 26dce245b0..cba1869918 100644
--- a/testing/py-beautifulsoup4/APKBUILD
+++ b/testing/py-beautifulsoup4/APKBUILD
@@ -1,47 +1,57 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Contributor: Orson Teodoro <orsonteodoro@hotmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
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"
license="MIT"
-makedepends="python2-dev py-setuptools python3-dev"
-subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+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
-build() {
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
- python2 setup.py build || return 1
- python3 setup.py build || return 1
-}
-
-package() {
- mkdir -p "$pkgdir"
+ msg "subpkdir is $subpkgdir"
+ $python setup.py build -b $python install --prefix=/usr --root="$subpkgdir"
}
_py2() {
- replaces="$pkgname"
- depends="${depends//py-/py2-}"
_py python2
}
_py3() {
- depends="${depends//py-/py3-}"
+ cd "$builddir"
+ rm -rf bs4
+ mv py3k/bs4 bs4
_py python3
}
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- depends="$depends $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
+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"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
+ python2 setup.py check
+ python3 setup.py check
+ ./test-all-versions
}
-sha512sums="1a7eee4218e58cc3852e71fe4f0892f673bb46a851941264766a38eff8ef05d612d88b4641fcb478ce8f66ac50dc987ca039923c4bbb11867c74813289f7e578 beautifulsoup4-4.6.0.tar.gz"
+sha512sums="1a7eee4218e58cc3852e71fe4f0892f673bb46a851941264766a38eff8ef05d612d88b4641fcb478ce8f66ac50dc987ca039923c4bbb11867c74813289f7e578 beautifulsoup4-4.6.0.tar.gz
+5651c62b4a989df212c34e54ce84e61367fc4e992df3d50965fd7ed9589683d5b201db6ea60c2c6e90d9fb9c3bac2cb8553092bd571259744d82e0ba0d28f7b2 unattended-tests.patch"
diff --git a/testing/py-beautifulsoup4/unattended-tests.patch b/testing/py-beautifulsoup4/unattended-tests.patch
new file mode 100644
index 0000000000..623d070085
--- /dev/null
+++ b/testing/py-beautifulsoup4/unattended-tests.patch
@@ -0,0 +1,16 @@
+--- a/convert-py3k.orig
++++ b/convert-py3k
+@@ -7,10 +7,10 @@
+ echo "About to destroy and rebuild the py3k/bs4 directory."
+ echo "If you've got stuff in there, Ctrl-C out of this script or answer 'n'."
+ mkdir -p py3k
+-rm -rfI py3k/bs4
++rm -rf py3k/bs4
+ cp -r bs4/ py3k/
+ 2to3 -w py3k
+ echo ""
+ echo "OK, conversion is done."
+ echo "Now running the unit tests."
+-(cd py3k && python3 -m unittest discover -s bs4)
+\ No newline at end of file
++(cd py3k && python3 -m unittest discover -s bs4)