summaryrefslogtreecommitdiff
path: root/community/python-pandas/PKGBUILD
blob: 3aa15956dc331a7ee414da162a0607ae83105ff3 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# $Id: PKGBUILD 112915 2014-06-09 13:12:15Z aginiewicz $
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Keith Hughitt <khughitt@umd.edu>

pkgbase=python-pandas
pkgname=('python2-pandas' 'python-pandas')
pkgver=0.14.0
pkgrel=2
pkgdesc="Cross-section and time series data analysis toolkit"
arch=('i686' 'x86_64')
url="http://pandas.pydata.org/"
license=('BSD')
makedepends=('python-setuptools' 'python-dateutil' 'python-numpy' 'python-pytz'
             'python2-setuptools' 'python2-dateutil' 'python2-numpy' 'python2-pytz')
source=("https://pypi.python.org/packages/source/p/pandas/pandas-${pkgver}.tar.gz")
md5sums=('b775987c0ceebcc8d5ace4a1241c967a')

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

  msg "Building Python2"
  cd "$srcdir"/pandas-py2-${pkgver}
  python2 setup.py build_ext --inplace
  python2 setup.py build

  msg "Building Python3"
  cd "$srcdir"/pandas-${pkgver}
  python setup.py build_ext --inplace
  python setup.py build
}

package_python2-pandas() {
  depends=('python2-numpy' 'python2-dateutil' 'python2-pytz')
  optdepends=('python2-numexpr: needed for accelerating certain numerical operations (recommended)'
              'python2-bottleneck: needed for accelerating certain types of nan evaluations (recommended)'
              'python2-scipy: needed for miscellaneous statistical functions'
              'python2-pytables: needed for HDF5-based storage'
              'python2-sqlalchemy: needed for SQL database support'
              'python2-matplotlib: needed for plotting'
              'python2-statsmodels: needed for parts of pandas.stats'
              'python2-openpyxl1: needed for Excel XLSX input/output'
              'python2-xlsxwriter: alternative Excel XLSX output'
              'python2-xlrd: needed for Excel XLS input'
              'python2-xlwt: needed for Excel XLS output'
              'python2-boto: needed for access to Amazon S3 storage'
              'python2-beautifulsoup4: needed for read_html function'
              'python2-lxml: needed for read_html function (and/or python2-html5lib)'
              'python2-html5lib: needed for read_hmlt function (and/or python2-lxml)'
              'xsel: needed for read_clipboard function (or xclip)'
              'xclip: needed for read_clipboard function (or xsel)')

  cd "$srcdir"/pandas-py2-${pkgver}

  python2 setup.py install --skip-build --root="$pkgdir" --optimize=1

  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" $(find "${pkgdir}" -name '*.py')
  sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" $(find "${pkgdir}" -name '*.py')

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

package_python-pandas() {
  depends=('python-numpy' 'python-dateutil' 'python-pytz')
  optdepends=('python-numexpr: needed for accelerating certain numerical operations (recommended)'
              'python-bottleneck: needed for accelerating certain types of nan evaluations (recommended)'
              'python-scipy: needed for miscellaneous statistical functions'
              'python-pytables: needed for HDF5-based storage'
              'python-sqlalchemy: needed for SQL database support'
              'python-matplotlib: needed for plotting'
              'python-statsmodels: needed for parts of pandas.stats'
              'python-openpyxl1: needed for Excel XLSX input/output'
              'python-xlsxwriter: alternative Excel XLSX output'
              'python-xlrd: needed for Excel XLS input'
              'python-beautifulsoup4: needed for read_html function'
              'python-lxml: needed for read_html function (and/or python-html5lib)'
              'python-html5lib: needed for read_hmlt function (and/or python-lxml)'
              'xsel: needed for read_clipboard function (or xclip)'
              'xclip: needed for read_clipboard function (or xsel)')

  cd "$srcdir"/pandas-${pkgver}

  python setup.py install --skip-build --root="$pkgdir" --optimize=1

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