aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-psycopg2/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-09-19 00:05:24 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-19 00:06:50 +0200
commitf90ea68f3166bcae943dbac8c51ab4055a7a17f3 (patch)
tree7108e0a7a402cbfcc5761962b086582c72622ff8 /main/py-psycopg2/APKBUILD
parent7a0fe3f0535a591ab1ef455b6fa731af644086b6 (diff)
downloadaports-f90ea68f3166bcae943dbac8c51ab4055a7a17f3.tar.bz2
aports-f90ea68f3166bcae943dbac8c51ab4055a7a17f3.tar.xz
main/py-psycopg2: add py2/py3 subpackages
Diffstat (limited to 'main/py-psycopg2/APKBUILD')
-rw-r--r--main/py-psycopg2/APKBUILD39
1 files changed, 29 insertions, 10 deletions
diff --git a/main/py-psycopg2/APKBUILD b/main/py-psycopg2/APKBUILD
index fc52ea5dbc..397f759a33 100644
--- a/main/py-psycopg2/APKBUILD
+++ b/main/py-psycopg2/APKBUILD
@@ -3,27 +3,46 @@
pkgname=py-psycopg2
_pkgname=psycopg2
pkgver=2.6.2
-pkgrel=0
+pkgrel=1
pkgdesc="A Python-PostgreSQL Database Adapter"
url="http://initd.org/psycopg/"
-arch="all"
+arch="noarch"
license="LGPL2+"
-depends="py-egenix-mx-base"
-depends_dev=""
-makedepends="python-dev postgresql-dev py-egenix-mx-base-dev"
-install=""
-subpackages=""
+depends=""
+makedepends="postgresql-dev python2-dev python3-dev py-egenix-mx-base-dev"
+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"
-builddir="$srcdir"/$_pkgname-$pkgver
build() {
cd "$builddir"
- python setup.py build || return 1
+
+ python2 setup.py build || return 1
+ python3 setup.py build
}
package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="py-egenix-mx-base"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ arch="all"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
cd "$builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" --skip-build || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
md5sums="4a392949ba31a378a18ed3e775a4693f psycopg2-2.6.2.tar.gz"