summaryrefslogtreecommitdiff
path: root/dev-python/netcdf4
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/netcdf4')
-rw-r--r--dev-python/netcdf4/Manifest1
-rw-r--r--dev-python/netcdf4/metadata.xml25
-rw-r--r--dev-python/netcdf4/netcdf4-1.7.4.ebuild55
3 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/netcdf4/Manifest b/dev-python/netcdf4/Manifest
new file mode 100644
index 000000000000..c6d4fcfe2190
--- /dev/null
+++ b/dev-python/netcdf4/Manifest
@@ -0,0 +1 @@
+DIST netcdf4-1.7.4.tar.gz 838352 BLAKE2B 04c53f692234ebd5fba1e58cabacba337f70dfbc909aeb798b4663eb55446bed008bf783872325d4c99d4e2cfd856aa20194835d57e76669b84824cf216771d5 SHA512 e6021d3701cfb27a283592c5804e125b64adde541f60b1636ef5c1c604ea5eca3c4f9b72c72b0af958a341d876a991a5e3d45092ab1d0ed72384b7442cd8f425
diff --git a/dev-python/netcdf4/metadata.xml b/dev-python/netcdf4/metadata.xml
new file mode 100644
index 000000000000..f6f7879534ae
--- /dev/null
+++ b/dev-python/netcdf4/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</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>
+ <use>
+ <flag name="blosc">
+ Allow using blosc compression via <pkg>dev-libs/c-blosc</pkg>
+ </flag>
+ </use>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/netcdf4/netcdf4-1.7.4.ebuild b/dev-python/netcdf4/netcdf4-1.7.4.ebuild
new file mode 100644
index 000000000000..355e9da86836
--- /dev/null
+++ b/dev-python/netcdf4/netcdf4-1.7.4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYPI_PN=netCDF4
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="Python/numpy interface to the netCDF C library"
+HOMEPAGE="
+ https://unidata.github.io/netcdf4-python/
+ https://github.com/unidata/netcdf4-python/
+ https://pypi.org/project/netCDF4/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm64 ~x86"
+IUSE="blosc bzip2 mpi test szip zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ sci-libs/hdf5:=
+ sci-libs/netcdf:=[blosc(-)=,bzip2(-)=,hdf5,mpi=,szip=,zstd(-)=]
+"
+RDEPEND="
+ ${DEPEND}
+ dev-python/certifi[${PYTHON_USEDEP}]
+ dev-python/cftime[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/packaging[${PYTHON_USEDEP}]
+ >=dev-python/typing-extensions-4.15.0[${PYTHON_USEDEP}]
+ sci-libs/netcdf[tools(+)]
+ )
+"
+
+python_test() {
+ local -x NO_NET=1
+ cd test || die
+ "${EPYTHON}" run_all.py || die
+}
+
+pkg_postinst() {
+ optfeature "HDF4 support" sci-libs/hdf "sci-libs/netcdf[hdf]"
+ optfeature "OPeNDAP support" net-misc/curl "sci-libs/netcdf[dap]"
+}