desktop/python-pandas/PKGBUILD
2017-10-28 20:02:10 +02:00

106 lines
5.1 KiB
Bash

pkgbase=python-pandas
pkgname=('python2-pandas' 'python3-pandas')
pkgver=0.20.3
pkgrel=1
pkgdesc="Cross-section and time series data analysis toolkit"
arch=('x86_64')
url="http://pandas.pydata.org/"
license=('BSD')
makedepends=('python3-setuptools' 'python3-dateutil' 'python3-numpy' 'python3-pytz'
'python2-setuptools' 'python2-dateutil' 'python2-numpy' 'python2-pytz'
'cython3' 'cython2')
source=("https://github.com/pydata/pandas/archive/v${pkgver}.tar.gz")
sha1sums=('af0b1cc4e3479bca71359be5760b9d2c416298f9')
prepare() {
cd "$srcdir"
cp -a pandas-${pkgver} pandas-py2-${pkgver}
cd pandas-py2-${pkgver}
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
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}
python3 setup.py build_ext --inplace
python3 setup.py build
}
package_python2-pandas() {
depends=('python2-numpy' 'python2-dateutil' 'python2-pytz')
optdepends=('python2-pandas-datareader: pandas.io.data replacement (recommended)'
'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-openpyxl: needed for Excel XLSX input/output'
'python2-xlrd: needed for Excel XLS input'
'python2-xlwt: needed for Excel XLS output'
'python2-xlsxwriter: alternative Excel XLSX output'
'python2-jinja: needed for conditional HTML formatting'
'python2-boto: needed for access to Amazon S3 storage'
'python2-blosc: for msgpack compression using blosc'
'python2-pyqt4: needed for read_clipboard function (only one needed)'
'python2-pyside: needed for read_clipboard function (only one needed)'
'pygtk: needed for read_clipboard function (only one needed)'
'xsel: needed for read_clipboard function (only one needed)'
'xclip: needed for read_clipboard function (only one needed)'
'python2-gflags: needed for gbq'
'python2-google-api-python-client: needed for gbq'
'python2-setuptools: needed for gbq'
'python2-httplib2: needed for gbq'
'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)')
cd "$srcdir"/pandas-py2-${pkgver}
python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python3-pandas() {
depends=('python3-numpy' 'python3-dateutil' 'python3-pytz')
optdepends=('python3-pandas-datareader: pandas.io.data replacement (recommended)'
'python3-numexpr: needed for accelerating certain numerical operations (recommended)'
'python3-bottleneck: needed for accelerating certain types of nan evaluations (recommended)'
'python3-scipy: needed for miscellaneous statistical functions'
'python3-pytables: needed for HDF5-based storage'
'python3-sqlalchemy: needed for SQL database support'
'python3-matplotlib: needed for plotting'
'python3-statsmodels: needed for parts of pandas.stats'
'python3-openpyxl: needed for Excel XLSX input/output'
'python3-xlrd: needed for Excel XLS input'
'python3-xlwt: needed for Excel XLS output'
'python3-xlsxwriter: alternative Excel XLSX output'
'python3-jinja: needed for conditional HTML formatting'
'python3-boto: needed for access to Amazon S3 storage'
'python3-blosc: for msgpack compression using blosc'
'python3-pyqt4: needed for read_clipboard function (only one needed)'
'python3-pyside: needed for read_clipboard function (only one needed)'
'xsel: needed for read_clipboard function (only one needed)'
'xclip: needed for read_clipboard function (only one needed)'
'python3-beautifulsoup4: needed for read_html function'
'python3-lxml: needed for read_html function (and/or python-html5lib)'
'python3-html5lib: needed for read_hmlt function (and/or python-lxml)')
cd "$srcdir"/pandas-${pkgver}
python3 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}