[arch-commits] Commit in python-netcdf4/repos (3 files)

2018-07-08 Thread Felix Yan via arch-commits
Date: Sunday, July 8, 2018 @ 17:12:46
  Author: felixonmars
Revision: 355119

archrelease: copy trunk to community-staging-x86_64

Added:
  python-netcdf4/repos/community-staging-x86_64/
  python-netcdf4/repos/community-staging-x86_64/802.patch
(from rev 355118, python-netcdf4/trunk/802.patch)
  python-netcdf4/repos/community-staging-x86_64/PKGBUILD
(from rev 355118, python-netcdf4/trunk/PKGBUILD)

---+
 802.patch |   22 
 PKGBUILD  |   65 
 2 files changed, 87 insertions(+)

Copied: python-netcdf4/repos/community-staging-x86_64/802.patch (from rev 
355118, python-netcdf4/trunk/802.patch)
===
--- community-staging-x86_64/802.patch  (rev 0)
+++ community-staging-x86_64/802.patch  2018-07-08 17:12:46 UTC (rev 355119)
@@ -0,0 +1,22 @@
+From 138600a5a7df32772db1a81fd2882886818c8076 Mon Sep 17 00:00:00 2001
+From: Jeff Whitaker 
+Date: Thu, 24 May 2018 16:45:17 -0600
+Subject: [PATCH] fix for failing test
+
+---
+ test/tst_cdf5.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/tst_cdf5.py b/test/tst_cdf5.py
+index 1b46c91a..175f9b53 100644
+--- a/test/tst_cdf5.py
 b/test/tst_cdf5.py
+@@ -4,7 +4,7 @@
+ from numpy.testing import assert_array_equal
+ 
+ FILE_NAME = tempfile.NamedTemporaryFile(suffix='.nc', delete=False).name
+-dimsize = np.iinfo(np.int64).max # max unsigned 64 bit integer
++dimsize = np.iinfo(np.int32).max*2 # only allowed in CDF5
+ ndim = 100
+ arrdata = 
np.random.randint(np.iinfo(np.uint8).min,np.iinfo(np.uint8).max,size=ndim)
+ 

Copied: python-netcdf4/repos/community-staging-x86_64/PKGBUILD (from rev 
355118, python-netcdf4/trunk/PKGBUILD)
===
--- community-staging-x86_64/PKGBUILD   (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-07-08 17:12:46 UTC (rev 355119)
@@ -0,0 +1,65 @@
+# Maintainer: Bruno Pagani 
+# Contributor: Spyros Stathopoulos 
+# Contributor: richli 
+# Contributor: rememberthemer 
+
+_pkg=netCDF4
+pkgbase=python-${_pkg,,}
+pkgname=("python-${_pkg,,}" "python2-${_pkg,,}")
+pkgver=1.4.0
+pkgrel=3
+pkgdesc="Python/NumPy interface to the netCDF C library"
+arch=('x86_64')
+url="https://unidata.github.io/${_pkg,,}-python;
+license=('MIT')
+makedepends=('cython' 'python-setuptools' 'cython2' 'python2-setuptools' 
'python-numpy' 'python-cftime' 'python2-numpy' 'python2-cftime' 'netcdf')
+source=("https://pypi.io/packages/source/n/${_pkg}/${_pkg}-${pkgver}.tar.gz;
+'802.patch')
+sha256sums=('a6c0b46f410f101c09d60b8cc460aafec06732f0130c6cb2730717bcc605b388'
+'17e3442e75d75fcba5fabe387f5dc5ef1cc2e7a4de25d96a2fcec699ce628289')
+
+prepare() {
+cd ${_pkg}-${pkgver}
+patch -p1 -i ../802.patch
+cd ..
+cp -a ${_pkg}-${pkgver}{,-py2}
+}
+
+build() {
+cd ${_pkg}-${pkgver}
+USE_NCCONFIG=1 python setup.py build
+
+cd ../${_pkg}-${pkgver}-py2
+USE_NCCONFIG=1 python2 setup.py build
+}
+
+check() {
+cd ${_pkg}-${pkgver}/test
+PYTHONPATH="../build/lib.linux-${CARCH}-3.7" python -B ./run_all.py
+
+cd ../../${_pkg}-${pkgver}-py2/test
+PYTHONPATH="../build/lib.linux-${CARCH}-2.7" python2 -B ./run_all.py
+}
+
+package_python-netcdf4() {
+depends=('python-numpy' 'python-cftime' 'netcdf')
+
+cd ${_pkg}-${pkgver}
+USE_NCCONFIG=1 python setup.py install --prefix=/usr --root="${pkgdir}" 
--skip-build --optimize=2
+
+install -Dm644 docs/netCDF4/* -t 
"${pkgdir}"/usr/share/doc/${pkgname}/docs/netCDF4
+install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}
+
+package_python2-netcdf4() {
+depends=('python2-numpy' 'python2-cftime' 'netcdf')
+
+cd ${_pkg}-${pkgver}-py2
+USE_NCCONFIG=1 python2 setup.py install --prefix=/usr --root="${pkgdir}" 
--skip-build --optimize=2
+
+for binary in "${pkgdir}"/usr/bin/* ;
+do mv ${binary}{,-py2} ;
+done
+install -Dm644 docs/netCDF4/* -t 
"${pkgdir}"/usr/share/doc/${pkgname}/docs/netCDF4
+install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}


[arch-commits] Commit in python-netcdf4/repos (3 files)

2018-05-23 Thread Bruno Pagani via arch-commits
Date: Wednesday, May 23, 2018 @ 20:52:27
  Author: archange
Revision: 328468

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 328467, python-netcdf4/trunk/PKGBUILD)
  python-netcdf4/repos/community-staging-x86_64/fix-cdf5-test.patch
(from rev 328467, python-netcdf4/trunk/fix-cdf5-test.patch)

-+
 PKGBUILD|   60 ++
 fix-cdf5-test.patch |   13 ++
 2 files changed, 73 insertions(+)

Copied: python-netcdf4/repos/community-staging-x86_64/PKGBUILD (from rev 
328467, python-netcdf4/trunk/PKGBUILD)
===
--- community-staging-x86_64/PKGBUILD   (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-05-23 20:52:27 UTC (rev 328468)
@@ -0,0 +1,60 @@
+# Maintainer: Bruno Pagani 
+# Contributor: Spyros Stathopoulos 
+# Contributor: richli 
+# Contributor: rememberthemer 
+
+_pkg=netCDF4
+pkgbase=python-${_pkg,,}
+pkgname=("python-${_pkg,,}" "python2-${_pkg,,}")
+pkgver=1.4.0
+pkgrel=1
+pkgdesc="Python/NumPy interface to the netCDF C library"
+arch=('x86_64')
+url="https://unidata.github.io/${_pkg,,}-python;
+license=('MIT')
+makedepends=('cython' 'python-setuptools' 'cython2' 'python2-setuptools' 
'python-numpy' 'python-cftime' 'python2-numpy' 'python2-cftime' 'netcdf')
+source=("https://pypi.io/packages/source/n/${_pkg}/${_pkg}-${pkgver}.tar.gz;)
+sha256sums=('a6c0b46f410f101c09d60b8cc460aafec06732f0130c6cb2730717bcc605b388')
+
+prepare() {
+cp -a ${_pkg}-${pkgver}{,-py2}
+}
+
+build() {
+cd ${_pkg}-${pkgver}
+USE_NCCONFIG=1 python setup.py build
+
+cd ../${_pkg}-${pkgver}-py2
+USE_NCCONFIG=1 python2 setup.py build
+}
+
+check() {
+cd ${_pkg}-${pkgver}/test
+PYTHONPATH="../build/lib.linux-${CARCH}-3.6" python -B ./run_all.py || 
warning "Tests failed"
+
+cd ../../${_pkg}-${pkgver}-py2/test
+PYTHONPATH="../build/lib.linux-${CARCH}-2.7" python2 -B ./run_all.py || 
warning "Tests failed"
+}
+
+package_python-netcdf4() {
+depends=('python-numpy' 'python-cftime' 'netcdf')
+
+cd ${_pkg}-${pkgver}
+USE_NCCONFIG=1 python setup.py install --prefix=/usr --root="${pkgdir}" 
--skip-build --optimize=2
+
+install -Dm644 docs/netCDF4/* -t 
"${pkgdir}"/usr/share/doc/${pkgname}/docs/netCDF4
+install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}
+
+package_python2-netcdf4() {
+depends=('python2-numpy' 'python2-cftime' 'netcdf')
+
+cd ${_pkg}-${pkgver}-py2
+USE_NCCONFIG=1 python2 setup.py install --prefix=/usr --root="${pkgdir}" 
--skip-build --optimize=2
+
+for binary in "${pkgdir}"/usr/bin/* ;
+do mv ${binary}{,-py2} ;
+done
+install -Dm644 docs/netCDF4/* -t 
"${pkgdir}"/usr/share/doc/${pkgname}/docs/netCDF4
+install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
+}

Copied: python-netcdf4/repos/community-staging-x86_64/fix-cdf5-test.patch (from 
rev 328467, python-netcdf4/trunk/fix-cdf5-test.patch)
===
--- community-staging-x86_64/fix-cdf5-test.patch
(rev 0)
+++ community-staging-x86_64/fix-cdf5-test.patch2018-05-23 20:52:27 UTC 
(rev 328468)
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+--- a/setup.py
 b/setup.py
+@@ -81,7 +81,7 @@ def check_api(inc_dirs):
+ has_cdf5 = False
+ for line in open(ncmetapath):
+ if line.startswith('#define NC_HAS_CDF5'):
+-has_cdf5 = True
++has_cdf5_format = bool(int(line.split()[2]))
+ break
+ 
+ return has_rename_grp, has_nc_inq_path, has_nc_inq_format_extended, \
+