diff options
author | etckeeper | 2022-07-21 19:00:11 +0200 |
---|---|---|
committer | etckeeper | 2022-07-21 19:00:11 +0200 |
commit | 6c5430f5e4e3a6a323e8f82ac6ec50f80c3f9b38 (patch) | |
tree | a5dd7add5fc704a1cb1303a93145a9062a5fef77 | |
download | aur-6c5430f5e4e3a6a323e8f82ac6ec50f80c3f9b38.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 44 |
2 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1485e42bfb5c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = python-metpy + pkgdesc = collection of tools in Python for reading, visualizing and performing calculations with weather data. + pkgver = 1.3.1 + pkgrel = 1 + url = https://unidata.github.io/MetPy + arch = any + license = BSD + checkdepends = python-pytest + checkdepends = python-pytest-mpl + checkdepends = python-cartopy + checkdepends = python-shapely + checkdepends = python-netcdf4 + makedepends = python-setuptools + makedepends = python-setuptools-scm + depends = python + depends = python-matplotlib + depends = python-numpy + depends = python-scipy + depends = python-pandas + depends = python-pint + depends = python-pooch + depends = python-xarray + depends = python-pyproj + depends = python-traitlets + optdepends = python-cartopy: for the examples + optdepends = python-shapely: for the examples + source = python-metpy-1.3.1::https://github.com/Unidata/MetPy/archive/refs/tags/v1.3.1.tar.gz + sha256sums = 3739e8089ed978ae20eaea673fe3ab95948be1329cdc0a3b4c91c7d7c3d1cf96 + +pkgname = python-metpy diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..17c0b06f8c9f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: BrainDamage + +pkgname=python-metpy +pkgver=1.3.1 +pkgrel=1 +_basename="MetPy" +_dirname="${_basename}-${pkgver}" +pkgdesc="collection of tools in Python for reading, visualizing and performing calculations with weather data." +arch=(any) +url="https://unidata.github.io/MetPy" +license=('BSD') +depends=('python' 'python-matplotlib' 'python-numpy' 'python-scipy' + 'python-pandas' 'python-pint' 'python-pooch' 'python-xarray' + 'python-pyproj' 'python-traitlets') +optdepends=('python-cartopy: for the examples' 'python-shapely: for the examples') +makedepends=('python-setuptools' 'python-setuptools-scm') +# documentation dependencies +#makedepends+=('python-sphinx' 'python-sphinx-gallery' 'python-myst-parser' 'python-netcdf4') +checkdepends=('python-pytest' 'python-pytest-mpl' 'python-cartopy' 'python-shapely' 'python-netcdf4') +source=("${pkgname}-${pkgver}::https://github.com/Unidata/${_basename}/archive/refs/tags/v${pkgver}.tar.gz") +sha256sums=('3739e8089ed978ae20eaea673fe3ab95948be1329cdc0a3b4c91c7d7c3d1cf96') + +build() { + cd "${srcdir}/${_dirname}" + export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}" + export PYTHONHASHSEED=0 + python setup.py build +} + + +package() { + cd "${srcdir}/${_dirname}" + python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr" + # not necessary for every package, but for those who it is, it'd generate conflict with others otherwise + rm -rf "${pkgdir}/$(python -c 'import site; print(site.getsitepackages()[0])')/tests/" +} + + +check() { + cd "${srcdir}/${_dirname}" + # we need to prepend system's installation because the package is dumb and would otherwise override the io core module by name collision + export PYTHONPATH="$(python -c 'import sys; print(":".join(sys.path))'):${srcdir}/${_dirname}/build/lib/${_basename,,}" + pytest +} |