dev-python/netcdf4: Add transitive USE flags on netcdf

The Python package automatically uses various options compiled
into sci-libs/netcdf (via #ifdefs).  Add appropriate USE flags to
control the dependencies and rebuild the package.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny 2024-07-10 13:24:19 +02:00
parent f645c28739
commit 571bd307d2
No known key found for this signature in database
GPG Key ID: 639ADAE2329E240E
2 changed files with 7 additions and 3 deletions

View File

@ -20,4 +20,9 @@
<remote-id type="github">unidata/netcdf4-python</remote-id>
<remote-id type="pypi">netCDF4</remote-id>
</upstream>
<use>
<flag name="blosc">
Allow using blosc compression via <pkg>dev-libs/c-blosc</pkg>
</flag>
</use>
</pkgmetadata>

View File

@ -20,13 +20,13 @@ HOMEPAGE="
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
IUSE="blosc bzip2 mpi test szip zstd"
RESTRICT="!test? ( test )"
DEPEND="
dev-python/numpy[${PYTHON_USEDEP}]
sci-libs/hdf5:=
sci-libs/netcdf:=[hdf5]
sci-libs/netcdf:=[blosc(-)=,bzip2(-)=,hdf5,mpi=,szip=,zstd(-)=]
"
RDEPEND="
${DEPEND}
@ -50,6 +50,5 @@ python_test() {
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]"
}