Commit f90ea68f authored by Jakub Jirutka's avatar Jakub Jirutka

main/py-psycopg2: add py2/py3 subpackages

parent 7a0fe3f0
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment