Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/netcdf4-python/, dev-python/netcdf4-python/files/
Date: Mon, 28 Dec 2020 16:11:06
Message-Id: 1609171849.854e2a7b29c6053477dd63bc76d61d2db2c06858.soap@gentoo
1 commit: 854e2a7b29c6053477dd63bc76d61d2db2c06858
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Mon Dec 28 16:10:49 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 16:10:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854e2a7b
7
8 dev-python/netcdf4-python: Bump to 1.5.5
9
10 Closes: https://github.com/gentoo/gentoo/pull/18735
11 Closes: https://bugs.gentoo.org/612112
12 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 dev-python/netcdf4-python/Manifest | 1 +
16 .../files/netcdf4-python-1.5.5-tests.patch | 33 +++++++++++++++++
17 dev-python/netcdf4-python/metadata.xml | 28 +++++++--------
18 .../netcdf4-python/netcdf4-python-1.5.5.ebuild | 41 ++++++++++++++++++++++
19 4 files changed, 89 insertions(+), 14 deletions(-)
20
21 diff --git a/dev-python/netcdf4-python/Manifest b/dev-python/netcdf4-python/Manifest
22 index c793eb8953c..0784f46d550 100644
23 --- a/dev-python/netcdf4-python/Manifest
24 +++ b/dev-python/netcdf4-python/Manifest
25 @@ -1 +1,2 @@
26 DIST netCDF4-1.2.2.tar.gz 679107 BLAKE2B c15ed9332bd8e4bb18c312cd4418add169716ef29b6f5c4b935c880259a6a16c8388ed7c790919bfbbee631e9e96ce4b9a9afaeabb305e4dd32028353e62207d SHA512 e09465d125077e71b8aad4332be844099c7fa29d0ea8f1dd0887f7a5e849ab778361026323466b1d4897bc3d8f8be1818cfa5f426773c765ee9c5f3728ff3da3
27 +DIST netCDF4-1.5.5.tar.gz 793676 BLAKE2B 15783e359ed65062464874de24b3fabf07c5666f54f979cb4abd5429cb1668df9dc5aee6d96fb171f597b670ac87ac15400549659c82754da60dc9b00ab734cd SHA512 da6ead22ca60900468fbefdb5d1e9486555e73cf4d99096227404094e94cd4d0488320fe4eb2b7944e1183c39817d9e593065297f921016811b7dc6eabb918ef
28
29 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
30 new file mode 100644
31 index 00000000000..ff0085c7a1f
32 --- /dev/null
33 +++ b/dev-python/netcdf4-python/files/netcdf4-python-1.5.5-tests.patch
34 @@ -0,0 +1,33 @@
35 +# tst_diskless.py fails and tst_dap.py requires network
36 +--- a/test/run_all.py
37 ++++ b/test/run_all.py
38 +@@ -16,9 +16,6 @@ if python3:
39 + else:
40 + test_files.remove('tst_unicode3.py')
41 + sys.stdout.write('not running tst_unicode3.py ...\n')
42 +-if __netcdf4libversion__ < '4.2.1' or __has_parallel4_support__ or __has_pnetcdf_support__:
43 +- test_files.remove('tst_diskless.py')
44 +- sys.stdout.write('not running tst_diskless.py ...\n')
45 + if not __has_nc_inq_path__:
46 + test_files.remove('tst_filepath.py')
47 + sys.stdout.write('not running tst_filepath.py ...\n')
48 +@@ -29,14 +26,11 @@ if not __has_cdf5_format__ or struct.calcsize("P") < 8:
49 + test_files.remove('tst_cdf5.py')
50 + sys.stdout.write('not running tst_cdf5.py ...\n')
51 +
52 +-# Don't run tests that require network connectivity
53 +-if os.getenv('NO_NET'):
54 +- test_files.remove('tst_dap.py');
55 +- sys.stdout.write('not running tst_dap.py ...\n')
56 +-else:
57 +- # run opendap test first (issue #856).
58 +- test_files.remove('tst_dap.py')
59 +- test_files.insert(0,'tst_dap.py')
60 ++test_files.remove('tst_diskless.py')
61 ++sys.stdout.write('not running tst_diskless.py ...\n')
62 ++
63 ++test_files.remove('tst_dap.py');
64 ++sys.stdout.write('not running tst_dap.py ...\n')
65 +
66 + # Build the test suite from the tests found in the test files.
67 + testsuite = unittest.TestSuite()
68
69 diff --git a/dev-python/netcdf4-python/metadata.xml b/dev-python/netcdf4-python/metadata.xml
70 index b230a3c11bf..a0d7a57b9d3 100644
71 --- a/dev-python/netcdf4-python/metadata.xml
72 +++ b/dev-python/netcdf4-python/metadata.xml
73 @@ -1,18 +1,18 @@
74 <?xml version="1.0" encoding="UTF-8"?>
75 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
76 <pkgmetadata>
77 - <maintainer type="project">
78 - <email>sci@g.o</email>
79 - <name>Gentoo Science Project</name>
80 - </maintainer>
81 - <longdescription>
82 - netcdf4-python is a Python interface to the netCDF C library.
83 - netCDF version 4 can read and write files in both the new netCDF 4
84 - and the old netCDF 3 format, and can create files that are readable
85 - by HDF5 clients. The API modelled after Scientific.IO.NetCDF, and
86 - should be familiar to users of that module.
87 - </longdescription>
88 - <upstream>
89 - <remote-id type="pypi">netCDF4</remote-id>
90 - </upstream>
91 + <maintainer type="project">
92 + <email>sci@g.o</email>
93 + <name>Gentoo Science Project</name>
94 + </maintainer>
95 + <longdescription>
96 + netcdf4-python is a Python interface to the netCDF C library.
97 + netCDF version 4 can read and write files in both the new netCDF 4
98 + and the old netCDF 3 format, and can create files that are readable
99 + by HDF5 clients. The API modelled after Scientific.IO.NetCDF, and
100 + should be familiar to users of that module.
101 + </longdescription>
102 + <upstream>
103 + <remote-id type="pypi">netCDF4</remote-id>
104 + </upstream>
105 </pkgmetadata>
106
107 diff --git a/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild b/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild
108 new file mode 100644
109 index 00000000000..1bcc154d309
110 --- /dev/null
111 +++ b/dev-python/netcdf4-python/netcdf4-python-1.5.5.ebuild
112 @@ -0,0 +1,41 @@
113 +# Copyright 1999-2020 Gentoo Authors
114 +# Distributed under the terms of the GNU General Public License v2
115 +
116 +EAPI=7
117 +
118 +DISTUTILS_USE_SETUPTOOLS=bdepend
119 +PYTHON_COMPAT=( python3_{6..9} )
120 +inherit distutils-r1 optfeature
121 +
122 +MY_PN="netCDF4"
123 +MY_P="${MY_PN}-${PV}"
124 +
125 +DESCRIPTION="Python/numpy interface to the netCDF C library"
126 +HOMEPAGE="https://unidata.github.io/netcdf4-python/"
127 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
128 +
129 +LICENSE="MIT"
130 +SLOT="0"
131 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
132 +
133 +RDEPEND="
134 + dev-python/cftime[${PYTHON_USEDEP}]
135 + dev-python/numpy[${PYTHON_USEDEP}]
136 + sci-libs/hdf5
137 + sci-libs/netcdf:=[hdf5]"
138 +DEPEND="${RDEPEND}"
139 +
140 +PATCHES=( "${FILESDIR}"/${P}-tests.patch )
141 +
142 +S="${WORKDIR}"/${MY_P}
143 +
144 +python_test() {
145 + cd test || die
146 + "${EPYTHON}" run_all.py || die
147 +}
148 +
149 +pkg_postinst() {
150 + optfeature "HDF4 support" sci-libs/hdf sci-libs/netcdf[hdf]
151 + optfeature "MPI parallel IO support" sci-libs/hdf5[mpi] sci-libs/netcdf[mpi]
152 + optfeature "OPeNDAP support" net-misc/curl sci-libs/netcdf[dap]
153 +}