summaryrefslogtreecommitdiff
path: root/community/python-sqlalchemy/PKGBUILD
blob: 58c27c81f130d00d50df55f8d49045b4bf28b8c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $Id: PKGBUILD 103642 2014-01-08 17:00:04Z bgyorgy $ 
# Maintainer: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>

pkgbase=python-sqlalchemy
pkgname=('python-sqlalchemy' 'python2-sqlalchemy')
pkgver=0.9.1
pkgrel=1
arch=('i686' 'x86_64') # python2 package contain .so
url="http://www.sqlalchemy.org/"
license=('custom: MIT')
makedepends=('python' 'python2' 'python-setuptools' 'python2-setuptools' 'python-nose' 'python2-nose')
source=("https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz")
md5sums=('4d59a03e56ee37fc7b53ff1ef5f4310d')

build() {
  cp -a SQLAlchemy-$pkgver SQLAlchemy2-$pkgver
  cd SQLAlchemy-$pkgver
  python setup.py build
  cd ../SQLAlchemy2-$pkgver
  python2 setup.py build
}

check() {
  cd SQLAlchemy-${pkgver}
  python setup.py check
  python2 setup.py check

}

package_python-sqlalchemy() {
  pkgdesc='Python SQL toolkit and Object Relational Mapper'
  depends=('python')
  optdepends=('python-psycopg2: connect to PostgreSQL database')

  cd SQLAlchemy-${pkgver}
  python 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')

  cd SQLAlchemy2-$pkgver
  python2 setup.py install --root="$pkgdir"
  install -D -m644 LICENSE \
	  "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 ft=sh et: