# Contributor: Fabian Affolter # Maintainer: Fabian Affolter setvar pkgname = 'py-psycopg2' setvar _pkgname = 'psycopg2' setvar pkgver = '2.7.3.1' setvar pkgrel = '0' setvar pkgdesc = ""A Python-PostgreSQL Database Adapter"" setvar url = ""http://initd.org/psycopg/"" setvar arch = ""all"" setvar license = ""LGPL2+"" setvar makedepends = ""postgresql-dev python2-dev python3-dev py-egenix-mx-base-dev"" setvar subpackages = ""py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"" setvar source = ""https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"" setvar builddir = ""$srcdir/$_pkgname-$pkgver"" proc build { cd $builddir python2 setup.py build python3 setup.py build } proc package { mkdir -p $pkgdir } proc _py2 { setvar replaces = "$pkgname" setvar depends = ""py-egenix-mx-base"" _py python2 } proc _py3 { _py python3 } proc _py { local python="$1" setvar pkgdesc = ""$pkgdesc (for $python)"" setvar install_if = ""$pkgname=$pkgver-r$pkgrel $python"" cd $builddir $python setup.py install --prefix=/usr --root="$subpkgdir" } setvar sha512sums = ""206d4cf62a091927daf4b734e0b3597399fc588cb738366711674fc06c39d68a682981bc4756c356d37c41caba49b5df2b915beace8670c190d7d41e374f1eb5 psycopg2-2.7.3.1.tar.gz""