Date: Friday, April 7, 2023 @ 04:19:07
Author: felixonmars
Revision: 1440502
archrelease: copy trunk to community-staging-x86_64
Added:
python-netcdf4/repos/community-staging-x86_64/
python-netcdf4/repos/community-staging-x86_64/PKGBUILD
(from rev 1440501, python-netcdf4/trunk/PKGBUILD)
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Copied: python-netcdf4/repos/community-staging-x86_64/PKGBUILD (from rev
1440501, python-netcdf4/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-07 04:19:07 UTC (rev 1440502)
@@ -0,0 +1,41 @@
+# Maintainer: Bruno Pagani <[email protected]>
+# Contributor: Spyros Stathopoulos <[email protected]>
+# Contributor: richli <rich at dranek dot com>
+# Contributor: rememberthemer <rememberthemer@_GMAIL_DOT_COM_>
+
+_pkg=netCDF4
+pkgname=python-${_pkg,,}
+pkgver=1.6.2
+pkgrel=2
+pkgdesc="Python/NumPy interface to the netCDF C library"
+arch=(x86_64)
+url="https://unidata.github.io/netcdf4-python"
+license=(MIT)
+depends=(python-numpy python-cftime netcdf)
+makedepends=(cython python-setuptools)
+source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz
+
${pkgname}-fix-netcdf-filters-detection.patch::https://github.com/Unidata/netcdf4-python/pull/1173.patch)
+sha256sums=('0382b02ff6a288419f6ffec85dec40f451f41b8755547154c575ddd9f0f4ae53'
+ 'c407affa80e49547dca938ef1cb4764dedb9abd8f32a3e402d66d29aa7137f4c')
+
+prepare() {
+ # Compressor filters are not packaged currently
+ patch -p1 -d ${_pkg}-${pkgver} <
${pkgname}-fix-netcdf-filters-detection.patch || true
+}
+
+build() {
+ cd ${_pkg}-${pkgver}
+ USE_NCCONFIG=1 python setup.py build
+}
+
+check() {
+ cd ${_pkg}-${pkgver}/test
+ local python_version=$(python -c 'import sys; print(".".join(map(str,
sys.version_info[:2])))')
+ NO_NET=1
PYTHONPATH="../build/lib.linux-${CARCH}-cpython-${python_version/./}" python -B
./run_all.py
+}
+
+package() {
+ cd ${_pkg}-${pkgver}
+ USE_NCCONFIG=1 python setup.py install --prefix=/usr --root="${pkgdir}"
--skip-build --optimize=2
+ install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}