Date: Thursday, February 20, 2020 @ 14:37:45 Author: archange Revision: 577274
Initial addition of python-xarray to [community] checkdepends of python-spyder-kernels Added: python-xarray/ python-xarray/repos/ python-xarray/trunk/ python-xarray/trunk/PKGBUILD ----------+ PKGBUILD | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) Added: python-xarray/trunk/PKGBUILD =================================================================== --- python-xarray/trunk/PKGBUILD (rev 0) +++ python-xarray/trunk/PKGBUILD 2020-02-20 14:37:45 UTC (rev 577274) @@ -0,0 +1,77 @@ +# Maintainer: Bruno Pagani <[email protected]> + +_pkg=xarray +pkgname=python-${_pkg} +pkgver=0.15.0 +pkgrel=1 +pkgdesc="N-D labeled arrays and datasets in Python" +arch=(any) +url="https://xarray.pydata.org/" +license=(Apache) +makedepends=(python-setuptools) +depends=(python-numpy python-pandas) +optdepends=( + 'python-netcdf4: netCDF4 support' + 'python-scipy: interpolation features & fallback for netCDF3 support' +# 'python-pydap: fallback for accessing OPeNDAP' +# 'python-h5netcdf: alternative for netCDF4 support' +# 'python-pynio: geoscience specific file formats support' +# 'python-zarr: chunked, compressed N-dimensional arrays' + 'python-cftime: datetimes support for non-standard calendars or distant dates' +# 'python-pseudonetcdf: atmospheric science specific file formats support' +# 'python-rasterio: GeoTiffs and other gridded raster datasets support' +# 'python-iris: conversion to and from iris’ Cube objects' +# 'python-cfgrib: mapping GRIB files to CDF4' + 'python-bottleneck: faster NaN-skipping and rolling window aggregations' +# 'python-numbagg: faster exponential rolling window operations' +# 'python-dask: parallel computation' + 'python-matplotlib: plotting support' +# 'python-cartopy: plotting of cartographic data' + 'python-seaborn: better color palettes for plots' +# 'python-nc-time-axis: plotting of cftime.datetime objects' +# 'python-sparse: sparse arrays support' + 'python-pint: units of measure support' +) +checkdepends=( + python-pytest + python-netcdf4 + python-scipy + python-cftime + python-bottleneck + python-matplotlib + python-seaborn +# Our pint version is too new for the tests to work +# See: * https://github.com/pydata/xarray/issues/3778 +# * https://github.com/pydata/xarray/issues/3779 +# * https://github.com/pydata/xarray/issues/3783 +# python-pint +) +source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz + python-xarray-fix-seaborn-0.10-tests.patch::https://github.com/pydata/xarray/commit/52ee5dfe73b51b55cc90f2140f2cd54a2e7946a0.patch + python-xarray-fix-dask-requiring-test.patch::https://github.com/pydata/xarray/commit/90e734a55792f3c19e795df110fc3501c609d191.patch) +sha256sums=('c72d160c970725201f769e80fb91cbad68d6ebf21d68fcc371385a6c950459c3' + '3ec57ce98bd3bef2a3a0ea4d5d545a43c8cb827b3c95299c658acf0f32b71803' + '732c37fdb639672b3f7f9e36753d29ed5558d28635fc0e8efbfc9888282a3580') + +prepare() { + cd ${_pkg}-${pkgver} + patch -p1 -i ../python-xarray-fix-seaborn-0.10-tests.patch + patch -p1 -i ../python-xarray-fix-dask-requiring-test.patch +} + +build() { + cd ${_pkg}-${pkgver} + python setup.py build +} + +check() { + cd ${_pkg}-${pkgver} + pytest +} + +package() { + cd ${_pkg}-${pkgver} + python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1 + # Remove tests + rm -r "${pkgdir}"$(python -c "import site; print(site.getsitepackages()[0])")/xarray/tests +}
