Files
python-netCDF4/python-netCDF4.spec
Dirk Mueller cb1470d6ac - update to 1.7.1.post2:
* ci fixes
  * make sure arrays are masked that are not filled when auto_fill is off
 * automatically create views of compound types with character arrays as
 * always return masked array by default, even if there are no
 * always search for HDF5 headers when building, even when nc-config is used
   encodings (such as cp1252 on windows) can be handled in Dataset
   such as var[:,::2,::2,::2])), so a variable method use_nc_get_vars was added.
   segfaults can occur. Fix required raising them minimum numpy requirement
    data. When writing the data, stringtochar is used to convert a numpy
  * fix some test failures on big endian PPC64 that were due to
  * raise warning for HDF5 1.10.x (issue #549), since backwards
    fails.  raise IOError instead of RuntimeError when nc_create or
    (pull request #543).
    mysterious segfaults on CentOS6 (issue #506). Segfaults
  * Potential memory leaks fixed by freeing string pointers internally allocated
  * invoke str on filename argument to Dataset constructor, so pathlib
  * dates do not have to be contiguous, i.e. can be before and after the

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-netCDF4?expand=0&rev=45
2024-09-30 13:11:36 +00:00

117 lines
3.8 KiB
RPMSpec

#
# spec file for package python-netCDF4
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-netCDF4
Version: 1.7.1.post2
Release: 0
Summary: Python interface to netCDF 3 and 4
License: HPND AND MIT
URL: https://github.com/Unidata/netcdf4-python
Source: https://files.pythonhosted.org/packages/source/n/netcdf4/netcdf4-%{version}.tar.gz
Source99: python-netCDF4.rpmlintrc
BuildRequires: %{python_module Cython >= 0.29}
BuildRequires: %{python_module certifi}
BuildRequires: %{python_module cftime}
BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module numpy-devel >= 1.10.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 61}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: hdf5-devel >= 1.8.4
BuildRequires: libcurl-devel
BuildRequires: libjpeg-devel
BuildRequires: netcdf-devel >= 4.2
BuildRequires: python-rpm-macros
Requires: hdf5 >= 1.8.4
Requires: netcdf >= 4.2
Requires: python-certifi
Requires: python-cftime
Requires: python-numpy >= 1.10.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
# SECTION tests
BuildRequires: %{python_module pytest}
BuildRequires: netcdf
# /SECTION
%python_subpackages
%description
netCDF version 4 has many features not found in earlier versions of
the library and is implemented on top of HDF5. This module 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.
Most new features of netCDF 4 are implemented, such as multiple unlimited
dimensions, groups and zlib data compression. All the new numeric data types
(such as 64 bit and unsigned integer types) are implemented. Compound and
variable length (vlen) data types are supported, but the enum and opaque data
types are not. Mixtures of compound and vlen data types (compound types
containing vlens, and vlens containing compound types) are not supported.
%prep
%autosetup -p1 -n netcdf4-%{version}
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/ncinfo
%python_clone -a %{buildroot}%{_bindir}/nc4tonc3
%python_clone -a %{buildroot}%{_bindir}/nc3tonc4
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
pushd test
export NO_NET=1
# Broken test in s390x, gh#Unidata/netcdf4-python#1124
%ifarch s390x
rm test_compoundvar.py
%endif
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python run_all.py
}
popd
%post
%python_install_alternative ncinfo
%python_install_alternative nc4tonc3
%python_install_alternative nc3tonc4
%postun
%python_uninstall_alternative ncinfo
%python_uninstall_alternative nc4tonc3
%python_uninstall_alternative nc3tonc4
%files %{python_files}
%doc Changelog README.md
%license LICENSE
%python_alternative %{_bindir}/nc3tonc4
%python_alternative %{_bindir}/nc4tonc3
%python_alternative %{_bindir}/ncinfo
%{python_sitearch}/netCDF4
%{python_sitearch}/netCDF4-%{version}.dist-info
%changelog