aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-funcsigs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-07 16:32:28 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-08 17:16:04 +0100
commit92c8d994fb05bf58c3f299c9a34b122ca32211da (patch)
tree86ed82e34027cd125dedbe4f7b133e5ec712f497 /main/py-funcsigs
parent2684666744448906c19f6833aeea1cee3ff81791 (diff)
downloadaports-92c8d994fb05bf58c3f299c9a34b122ca32211da.tar.bz2
aports-92c8d994fb05bf58c3f299c9a34b122ca32211da.tar.xz
main/py-funcsigs: add py2/py3 subpackages
Diffstat (limited to 'main/py-funcsigs')
-rw-r--r--main/py-funcsigs/APKBUILD35
1 files changed, 26 insertions, 9 deletions
diff --git a/main/py-funcsigs/APKBUILD b/main/py-funcsigs/APKBUILD
index 76e864c4dc..359a9059ed 100644
--- a/main/py-funcsigs/APKBUILD
+++ b/main/py-funcsigs/APKBUILD
@@ -7,23 +7,40 @@ pkgrel=0
pkgdesc="Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+"
url="http://funcsigs.readthedocs.org"
arch="noarch"
-license="ASL"
-depends="python2"
-depends_dev=""
-makedepends="$depends_dev python2-dev py-setuptools"
-install=""
-subpackages=""
+license="ASL 2.0"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+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"
-build () {
+build() {
cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
-
+
package() {
+ 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"
- python2 setup.py install --root="$pkgdir" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
md5sums="7e583285b1fb8a76305d6d68f4ccc14e funcsigs-1.0.2.tar.gz"