135 lines
4.8 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Keith Hughitt <khughitt@umd.edu>
pkgname=python-pandas
pkgver=2.2.2
pkgrel=3
pkgdesc='High-performance, easy-to-use data structures and data analysis tools for Python'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://pandas.pydata.org/"
license=(BSD)
depends=('python-numpy' 'python-dateutil' 'python-pytz')
makedepends=('git' 'cython' 'python-build' 'python-installer' 'meson-python' 'python-versioneer')
optdepends=(
'python-pandas-datareader: pandas.io.data replacement (recommended)'
'python-numexpr: accelerating certain numerical operations (recommended)'
'python-bottleneck: accelerating certain types of nan evaluations (recommended)'
'python-matplotlib: plotting'
'python-jinja: conditional formatting with DataFrame.style'
'python-tabulate: printing in Markdown-friendly format'
'python-scipy: miscellaneous statistical functions'
'python-numba: alternative execution engine'
'python-xarray: pandas-like API for N-dimensional data'
'python-xlrd: Excel XLS input'
'python-xlwt: Excel XLS output'
'python-openpyxl: Excel XLSX input/output'
'python-xlsxwriter: alternative Excel XLSX output'
# 'python-pyxlsb: XLSB input' (nowhere)
'python-beautifulsoup4: read_html function (in any case)'
'python-html5lib: read_html function (and/or python-lxml)'
'python-lxml: read_xml, to_xml and read_html function (and/or python-html5lib)'
'python-sqlalchemy: SQL database support'
'python-psycopg2: PostgreSQL engine for sqlalchemy'
'python-pymysql: MySQL engine for sqlalchemy'
'python-pytables: HDF5-based reading / writing'
'python-blosc: for msgpack compression using blosc'
'zlib: compression for msgpack'
# 'python-fastparquet: Parquet reading / writing' (in the AUR)
'python-pyarrow: Parquet, ORC and feather reading/writing'
# 'python-pyreadstat: SPSS files reading' (in the AUR)
'python-fsspec: handling files aside from local and HTTP'
# 'python-gcsfs: Google Cloud Storage access' (in the AUR)
# 'python-pandas-gbq: Google BigQuery access' (nowhere)
# 'python-s3fs: Amazon S3 access' (in the AUR)
'python-pyqt5: read_clipboard function (only one needed)'
'python-qtpy: read_clipboard function (only one needed)'
'xclip: read_clipboard function (only one needed)'
'xsel: read_clipboard function (only one needed)'
'python-brotli: Brotli compression'
'python-snappy: Snappy compression'
'python-zstandard: Zstandard (zstd) compression'
)
checkdepends=(
'python-pytest'
'python-pytest-asyncio'
'python-pytest-xdist'
'python-hypothesis'
'python-pandas-datareader'
'python-numexpr'
'python-bottleneck'
'python-matplotlib'
'python-jinja'
'python-tabulate'
'python-scipy'
'python-numba'
'python-xarray'
'python-xlrd'
'python-xlwt'
'python-openpyxl'
'python-xlsxwriter'
# 'python-pyxlsb' (nowhere)
'python-beautifulsoup4'
'python-html5lib'
'python-lxml'
'python-sqlalchemy'
'python-psycopg2'
'python-pymysql'
'python-pytables'
'python-blosc'
'zlib'
# 'python-fastparquet' (in the AUR)
'python-pyarrow'
# 'python-pyreadstat' (in the AUR)
'python-fsspec'
# 'python-gcsfs' (in the AUR)
# 'python-pandas-gbq' (nowhere)
# 'python-s3fs' (in the AUR)
'python-pyqt5'
'python-qtpy'
'xclip'
'xsel'
'python-brotli'
'python-snappy'
'python-zstandard'
'python-dask'
'python-toolz'
'python-cftime'
'python-statsmodels'
'python-scikit-learn'
'python-seaborn'
'python-geopandas'
'python-odfpy'
'ipython'
'python-botocore'
'python-numba'
)
# No test data in upstream tarballs
#source=(https://github.com/pandas-dev/pandas/releases/download/v${pkgver}/pandas-${pkgver}.tar.gz)
source=(git+https://github.com/pandas-dev/pandas#tag=v${pkgver})
sha256sums=('9ccd5a7d6adabae35b554eff2965848730cd18fd8c8393d2a449aa9ce5616208')
build() {
cd pandas
python -m build --wheel --no-isolation --skip-dependency-check
}
check() {
cd pandas
mkdir -p test-install
python -m installer --destdir="$PWD"/test-install dist/*.whl
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
mv pandas{,.backup} # Prevent pytest from picking up uncompiled pandas from $PWD
PYTHONPATH="$srcdir"/test-install/${site_packages} \
pytest -v pandas.backup -m "not network and not db and not slow and not clipboard and not single_cpu" -n 4 -r sxX --no-strict-data-files || true
mv pandas{.backup,.}
}
package() {
cd pandas
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}