aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-beautifulsoup4
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-28 23:33:45 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-08-29 02:17:07 -0300
commit259949f90ffb92fdc0a9ebf2492f693c9c61dd82 (patch)
treeacf82f2c119a2c72cc40044ff05cbf3e8d606b15 /community/py3-beautifulsoup4
parentdee49ccc79241e4989ae7fc2bf83db3a628dc904 (diff)
downloadaports-259949f90ffb92fdc0a9ebf2492f693c9c61dd82.tar.bz2
aports-259949f90ffb92fdc0a9ebf2492f693c9c61dd82.tar.xz
community/py3-beautifulsoup: rename from py-beautifulsoup4
Diffstat (limited to 'community/py3-beautifulsoup4')
-rw-r--r--community/py3-beautifulsoup4/APKBUILD64
1 files changed, 64 insertions, 0 deletions
diff --git a/community/py3-beautifulsoup4/APKBUILD b/community/py3-beautifulsoup4/APKBUILD
new file mode 100644
index 0000000000..caf16d42a3
--- /dev/null
+++ b/community/py3-beautifulsoup4/APKBUILD
@@ -0,0 +1,64 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-beautifulsoup4
+_pkgname=beautifulsoup4
+pkgver=4.6.1
+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"
+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() {
+ 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() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir-$python"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="598f6be620d6c656bdab6d0d6e767a1ffc695a790dc5e3e8cc0f411555de1c52ef1972c93d0916135375c74e5272dd112f00e5ed2fb12a12c90d5d30d852e91c beautifulsoup4-4.6.1.tar.gz"