aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-09 15:34:13 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 10:50:45 +0200
commit28026c2bc8f8b94e46a7d3a2c01bde748984d141 (patch)
tree65f68e72f2ae45078b698bbf7c6ac3132a4607bb
parentabfd2e4f147bb0a0717b9568f205d583ab60ebce (diff)
downloadaports-28026c2bc8f8b94e46a7d3a2c01bde748984d141.tar.bz2
aports-28026c2bc8f8b94e46a7d3a2c01bde748984d141.tar.xz
main/py-feedparser: enable py3
-rw-r--r--main/py-feedparser/APKBUILD44
1 files changed, 24 insertions, 20 deletions
diff --git a/main/py-feedparser/APKBUILD b/main/py-feedparser/APKBUILD
index 6e97033b72..7a354f558e 100644
--- a/main/py-feedparser/APKBUILD
+++ b/main/py-feedparser/APKBUILD
@@ -3,37 +3,41 @@
pkgname=py-feedparser
_pkgname=feedparser
pkgver=5.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="A Python feed parser for RSS and Atom"
url="https://github.com/kurtmckee/feedparser"
arch="noarch"
license="BSD"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
}
md5sums="d552f7a2a55e8e33b2a3fe1082505b42 feedparser-5.2.1.tar.gz"