summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-sqlalchemy/PKGBUILD
blob: 097dbeb567febd185d4703242e7643185bc4dce2 (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
54
55
56
57
58
59
60
61
62
# $Id$ 
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>

pkgbase=python-sqlalchemy
pkgname=('python-sqlalchemy' 'python2-sqlalchemy')
pkgver=1.2.4
pkgrel=1
arch=('x86_64') # python2 package contain .so
url="http://www.sqlalchemy.org/"
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pytest-xdist' 'python2-pytest-xdist' 'python-mock' 'python2-mock')
source=("https://pypi.io/packages/source/S/SQLAlchemy/SQLAlchemy-$pkgver.tar.gz"{,.asc})
validpgpkeys=('83AF7ACE251C13E6BB7DEFBD330239C1C4DAFEE1')
sha512sums=('a12d17f222cc5fc4360c439e19cae67a013af07e2c22b1f55511c4862d718578249e6bf83151eefe35957e530dbf18a565b08cded3a5e45dd21103201f4d24e8'
            'SKIP')

prepare() {
  cp -a SQLAlchemy-$pkgver SQLAlchemy2-$pkgver
}

build() {
  cd "$srcdir"/SQLAlchemy-$pkgver
  python setup.py build

  cd "$srcdir"/SQLAlchemy2-$pkgver
  python2 setup.py build
}

check() {
  cd "$srcdir"/SQLAlchemy-$pkgver
  python setup.py pytest
 
  cd "$srcdir"/SQLAlchemy2-$pkgver  
  python2 setup.py pytest
}

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: