summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Whited2018-12-26 23:07:10 -0600
committerSam Whited2018-12-26 23:07:10 -0600
commitbe6e2af93748543839365d1c1d8960b598111caa (patch)
treee21cc8c3727927c985c9ffdb0011e20b4835bc1b
parent011747a8d84de4a11ab4354e2b89030cee1e7fab (diff)
downloadaur-be6e2af93748543839365d1c1d8960b598111caa.tar.gz
Support Python 2 as well
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD24
2 files changed, 24 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1992a8ac168d..f12c7c0e8202 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,23 @@
pkgbase = python-psycopg2-binary
pkgdesc = Python-PostgreSQL Database Adapter
pkgver = 2.7.6.1
- pkgrel = 1
+ pkgrel = 2
url = http://initd.org/psycopg/
arch = x86_64
license = LGPL3
license = ZPL
makedepends = python-setuptools
+ makedepends = python2-setuptools
depends = postgresql-libs
- depends = python
conflicts = python-psycopg2
source = https://pypi.python.org/packages/source/p/psycopg2-binary/psycopg2-binary-2.7.6.1.tar.gz
sha256sums = 8d517e8fda2efebca27c2018e14c90ed7dc3f04d7098b3da2912e62a1a5585fe
pkgname = python-psycopg2-binary
+ depends = postgresql-libs
+ depends = python
+
+pkgname = python2-psycopg2-binary
+ depends = postgresql-libs
+ depends = python2
diff --git a/PKGBUILD b/PKGBUILD
index af3614c70957..fde8cb46e196 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,33 @@
# Maintainer: Sam Whited <sam@samwhited.com>
-pkgname=python-psycopg2-binary
-_name=${pkgname#python-}
+pkgbase=python-psycopg2-binary
+pkgname=('python-psycopg2-binary' 'python2-psycopg2-binary')
+_name=psycopg2-binary
pkgver=2.7.6.1
-pkgrel=1
+pkgrel=2
pkgdesc='Python-PostgreSQL Database Adapter'
conflicts=('python-psycopg2')
url='http://initd.org/psycopg/'
arch=('x86_64')
license=('LGPL3'
'ZPL')
-depends=('postgresql-libs'
- 'python')
-makedepends=('python-setuptools')
+depends=('postgresql-libs')
+makedepends=('python-setuptools'
+ 'python2-setuptools')
source=("https://pypi.python.org/packages/source/p/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('8d517e8fda2efebca27c2018e14c90ed7dc3f04d7098b3da2912e62a1a5585fe')
-package() {
+package_python-psycopg2-binary() {
+ depends+=('python')
+
cd "${srcdir}/${_name}-${pkgver}"
python setup.py install --root="${pkgdir}"
}
-# vim: ts=2 sw=2 et:
+package_python2-psycopg2-binary() {
+ depends+=('python2')
+
+ cd "${srcdir}/${_name}-${pkgver}"
+ python2 setup.py install --root="${pkgdir}"
+}