aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-xdg/APKBUILD
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-06-01 18:52:57 +0300
committerprspkt <prspkt@protonmail.com>2019-06-01 18:55:32 +0300
commitefaa33e87086950f1074c88ffe1805d6d3c97ff6 (patch)
treec7416421d8cb122ad4dcb0222d37b8e2b05cbc6e /testing/py-xdg/APKBUILD
parent26be2fbbe40d852fcd109fbd124d946710d8f2bf (diff)
downloadaports-efaa33e87086950f1074c88ffe1805d6d3c97ff6.tar.bz2
aports-efaa33e87086950f1074c88ffe1805d6d3c97ff6.tar.xz
testing/py-xdg: add python3
Diffstat (limited to 'testing/py-xdg/APKBUILD')
-rw-r--r--testing/py-xdg/APKBUILD32
1 files changed, 27 insertions, 5 deletions
diff --git a/testing/py-xdg/APKBUILD b/testing/py-xdg/APKBUILD
index e8ff8da361..60a46d20da 100644
--- a/testing/py-xdg/APKBUILD
+++ b/testing/py-xdg/APKBUILD
@@ -9,10 +9,9 @@ url="https://freedesktop.org/wiki/Software/pyxdg"
arch="noarch"
license="LGPL-2.1-only"
depends=""
-depends_dev="python2-dev"
-makedepends="$depends_dev"
+makedepends="python2 python3"
install=""
-subpackages=""
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$_pkgname-$pkgver
@@ -26,9 +25,32 @@ prepare() {
done
}
+build() {
+ python2 setup.py build
+ python3 setup.py build
+}
+
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="f5306e6e15af07df2599017500fc8ad83e722e5d5c6e4fda014aab1d77df92a3c3199a5be7a889faaecab72861e9910be9d80142d29856eb7a11f6ab9a923bd2 pyxdg-0.26.tar.gz"