# Maintainer: Manuel 'UtG' # Contributor: Julien Humbert # Contributor: Angel 'angvp' Velasquez pkgbase=python-sqlalchemy pkgname=('python3-sqlalchemy' 'python2-sqlalchemy') pkgver=0.9.7 pkgrel=1 pkgdesc="Python SQL toolkit and Object Relational Mapper" arch=('x86_64') url="http://www.sqlalchemy.org/" license=('MIT') makedepends=('python3' 'python2' 'python3-setuptools' 'python2-setuptools') checkdepends=('python2-pytest' 'python3-pytest' 'python2-mock' 'python3-mock') source=("https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz") md5sums=('e3c8f836ea9b48886718f59b9d8646ff') prepare() { cp -a SQLAlchemy-$pkgver SQLAlchemy2-$pkgver } build() { cd SQLAlchemy-$pkgver python3 setup.py build cd ../SQLAlchemy2-$pkgver python2 setup.py build } check() { check() { cd SQLAlchemy-${pkgver} python3 setup.py test cd ../SQLAlchemy2-$pkgver python2 setup.py test } } package_python3-sqlalchemy() { pkgdesc='Python SQL toolkit and Object Relational Mapper' depends=('python3') optdepends=('python3-psycopg2: connect to PostgreSQL database') cd SQLAlchemy-${pkgver} python3 setup.py install --root="${pkgdir}" install -D -m644 LICENSE \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } package_python2-sqlalchemy() { pkgdesc='Python 2 SQL toolkit and Object Relational Mapper' depends=('python2') optdepends=('python2-psycopg2: connect to PostgreSQL database') provides=('python-sqlalchemy') replaces=('python-sqlalchemy') conflicts=('python-sqlalchemy') cd SQLAlchemy2-$pkgver python2 setup.py install --root="$pkgdir" install -D -m644 LICENSE \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }