summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-12-28 17:10:49 +0100
committerDavid Seifert <soap@gentoo.org>2020-12-28 17:10:49 +0100
commit854e2a7b29c6053477dd63bc76d61d2db2c06858 (patch)
tree80783c601defcada951da99a16a16fa3c48a2407
parentdev-python/cftime: Time-handling functionality from netcdf4-python (diff)
downloadgentoo-854e2a7b.tar.gz
gentoo-854e2a7b.tar.bz2
gentoo-854e2a7b.zip
dev-python/netcdf4-python: Bump to 1.5.5
Closes: https://github.com/gentoo/gentoo/pull/18735 Closes: https://bugs.gentoo.org/612112 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--dev-python/netcdf4-python/Manifest1
-rw-r--r--dev-python/netcdf4-python/files/netcdf4-python-1.5.5-tests.patch33
-rw-r--r--dev-python/netcdf4-python/metadata.xml28
-rw-r--r--dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild41
4 files changed, 89 insertions, 14 deletions
diff --git a/dev-python/netcdf4-python/Manifest b/dev-python/netcdf4-python/Manifest
index c793eb8953c5..0784f46d5505 100644
--- a/dev-python/netcdf4-python/Manifest
+++ b/dev-python/netcdf4-python/Manifest
@@ -1 +1,2 @@
DIST netCDF4-1.2.2.tar.gz 679107 BLAKE2B c15ed9332bd8e4bb18c312cd4418add169716ef29b6f5c4b935c880259a6a16c8388ed7c790919bfbbee631e9e96ce4b9a9afaeabb305e4dd32028353e62207d SHA512 e09465d125077e71b8aad4332be844099c7fa29d0ea8f1dd0887f7a5e849ab778361026323466b1d4897bc3d8f8be1818cfa5f426773c765ee9c5f3728ff3da3
+DIST netCDF4-1.5.5.tar.gz 793676 BLAKE2B 15783e359ed65062464874de24b3fabf07c5666f54f979cb4abd5429cb1668df9dc5aee6d96fb171f597b670ac87ac15400549659c82754da60dc9b00ab734cd SHA512 da6ead22ca60900468fbefdb5d1e9486555e73cf4d99096227404094e94cd4d0488320fe4eb2b7944e1183c39817d9e593065297f921016811b7dc6eabb918ef
diff --git a/dev-python/netcdf4-python/files/netcdf4-python-1.5.5-tests.patch b/dev-python/netcdf4-python/files/netcdf4-python-1.5.5-tests.patch
new file mode 100644
index 000000000000..ff0085c7a1f6
--- /dev/null
+++ b/dev-python/netcdf4-python/files/netcdf4-python-1.5.5-tests.patch
@@ -0,0 +1,33 @@
+# tst_diskless.py fails and tst_dap.py requires network
+--- a/test/run_all.py
++++ b/test/run_all.py
+@@ -16,9 +16,6 @@ if python3:
+ else:
+ test_files.remove('tst_unicode3.py')
+ sys.stdout.write('not running tst_unicode3.py ...\n')
+-if __netcdf4libversion__ < '4.2.1' or __has_parallel4_support__ or __has_pnetcdf_support__:
+- test_files.remove('tst_diskless.py')
+- sys.stdout.write('not running tst_diskless.py ...\n')
+ if not __has_nc_inq_path__:
+ test_files.remove('tst_filepath.py')
+ sys.stdout.write('not running tst_filepath.py ...\n')
+@@ -29,14 +26,11 @@ if not __has_cdf5_format__ or struct.calcsize("P") < 8:
+ test_files.remove('tst_cdf5.py')
+ sys.stdout.write('not running tst_cdf5.py ...\n')
+
+-# Don't run tests that require network connectivity
+-if os.getenv('NO_NET'):
+- test_files.remove('tst_dap.py');
+- sys.stdout.write('not running tst_dap.py ...\n')
+-else:
+- # run opendap test first (issue #856).
+- test_files.remove('tst_dap.py')
+- test_files.insert(0,'tst_dap.py')
++test_files.remove('tst_diskless.py')
++sys.stdout.write('not running tst_diskless.py ...\n')
++
++test_files.remove('tst_dap.py');
++sys.stdout.write('not running tst_dap.py ...\n')
+
+ # Build the test suite from the tests found in the test files.
+ testsuite = unittest.TestSuite()
diff --git a/dev-python/netcdf4-python/metadata.xml b/dev-python/netcdf4-python/metadata.xml
index b230a3c11bf8..a0d7a57b9d31 100644
--- a/dev-python/netcdf4-python/metadata.xml
+++ b/dev-python/netcdf4-python/metadata.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
- </maintainer>
- <longdescription>
- netcdf4-python is a Python interface to the netCDF C library.
- netCDF version 4 can read and write files in both the new netCDF 4
- and the old netCDF 3 format, and can create files that are readable
- by HDF5 clients. The API modelled after Scientific.IO.NetCDF, and
- should be familiar to users of that module.
- </longdescription>
- <upstream>
- <remote-id type="pypi">netCDF4</remote-id>
- </upstream>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription>
+ netcdf4-python is a Python interface to the netCDF C library.
+ netCDF version 4 can read and write files in both the new netCDF 4
+ and the old netCDF 3 format, and can create files that are readable
+ by HDF5 clients. The API modelled after Scientific.IO.NetCDF, and
+ should be familiar to users of that module.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">netCDF4</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild b/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild
new file mode 100644
index 000000000000..1bcc154d3094
--- /dev/null
+++ b/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_USE_SETUPTOOLS=bdepend
+PYTHON_COMPAT=( python3_{6..9} )
+inherit distutils-r1 optfeature
+
+MY_PN="netCDF4"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Python/numpy interface to the netCDF C library"
+HOMEPAGE="https://unidata.github.io/netcdf4-python/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-python/cftime[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/hdf5
+ sci-libs/netcdf:=[hdf5]"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-tests.patch )
+
+S="${WORKDIR}"/${MY_P}
+
+python_test() {
+ cd test || die
+ "${EPYTHON}" run_all.py || die
+}
+
+pkg_postinst() {
+ optfeature "HDF4 support" sci-libs/hdf sci-libs/netcdf[hdf]
+ optfeature "MPI parallel IO support" sci-libs/hdf5[mpi] sci-libs/netcdf[mpi]
+ optfeature "OPeNDAP support" net-misc/curl sci-libs/netcdf[dap]
+}