summaryrefslogtreecommitdiff
path: root/community/python-pytables/PKGBUILD
blob: 9831e3438d36df0d566d62ea8e3884932b1af920 (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
# $Id: PKGBUILD 98817 2013-10-19 13:44:44Z bpiotrowski $
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Sebastien Binet <binet@cern.ch>

pkgbase=python-pytables
pkgname=('python2-pytables' 'python-pytables')
pkgver=3.0.0
pkgrel=4
arch=("i686" "x86_64" "mips64el")
pkgdesc="A package for managing hierarchical datasets and designed to efficiently and easily cope with extremely large amounts of data"
url="http://www.pytables.org"
license=("BSD")
makedepends=('lzo2' 'hdf5' 'python2-numexpr' 'cython2' 'python-numexpr' 'cython')
source=("http://pypi.python.org/packages/source/t/tables/tables-$pkgver.tar.gz")
md5sums=('9c8a18d51be5e94a2ae50ea31d26f8c2')

build() {
  cd "$srcdir"
  cp -a tables-$pkgver tables-py2-$pkgver

  msg "Building Python2"
  cd "$srcdir"/tables-py2-$pkgver
  python2 setup.py build

  msg "Building Python3"
  cd "$srcdir"/tables-$pkgver
  python setup.py build
}

package_python2-pytables() {
  depends=('lzo2' 'hdf5' 'python2-numexpr' 'cython2')

  cd "$srcdir"/tables-py2-${pkgver}
  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  # see FS#36015
  mv "$pkgdir"/usr/bin/pt2to3{,-2.7}
  mv "$pkgdir"/usr/bin/ptdump{,-2.7}
  mv "$pkgdir"/usr/bin/ptrepack{,-2.7}
}

package_python-pytables() {
  depends=('lzo2' 'hdf5' 'python-numexpr' 'cython')

  cd "$srcdir"/tables-${pkgver}
  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}