Compare commits

..

No commits in common. "rawhide" and "f23" have entirely different histories.
rawhide ... f23

5 changed files with 120 additions and 293 deletions

22
.gitignore vendored
View File

@ -7,25 +7,3 @@
/netcdf4-python-1.1.3.tar.gz
/netcdf4-python-1.1.4.tar.gz
/netcdf4-python-1.1.6.tar.gz
/netcdf4-python-1.2.2.tar.gz
/netcdf4-python-1.2.3.tar.gz
/netcdf4-python-1.2.4.tar.gz
/netcdf4-python-1.2.5.tar.gz
/netcdf4-python-1.2.6.tar.gz
/netcdf4-python-1.2.7.tar.gz
/netcdf4-python-1.2.9.tar.gz
/netcdf4-python-1.3.1.tar.gz
/netcdf4-python-1.4.1.tar.gz
/netcdf4-python-1.4.3.2.tar.gz
/netcdf4-python-1.5.0.1.tar.gz
/netcdf4-python-1.5.1.tar.gz
/netcdf4-python-1.5.1.2.tar.gz
/netcdf4-python-1.5.2.tar.gz
/netcdf4-python-1.5.3.tar.gz
/netcdf4-python-1.5.4.tar.gz
/netcdf4-python-1.5.5.1.tar.gz
/netcdf4-python-1.5.6.tar.gz
/netcdf4-python-1.5.7.tar.gz
/netcdf4-python-1.5.8.tar.gz
/netcdf4-python-1.6.0.tar.gz
/netcdf4-python-1.6.1.tar.gz

14
netcdf4-python-libs.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up netcdf4-python-92c0a1ca62b22d4173622122226c060de3c063c6/setup.py.libs netcdf4-python-92c0a1ca62b22d4173622122226c060de3c063c6/setup.py
--- netcdf4-python-92c0a1ca62b22d4173622122226c060de3c063c6/setup.py.libs 2014-05-09 15:26:35.080367287 -0600
+++ netcdf4-python-92c0a1ca62b22d4173622122226c060de3c063c6/setup.py 2014-05-09 15:27:31.109059089 -0600
@@ -243,8 +243,8 @@ NETCDF4_DIR environment variable not set
if netCDF4_libdir is None and netCDF4_dir is not None:
netCDF4_libdir = os.path.join(netCDF4_dir, 'lib')
- libs = ['netcdf','hdf5_hl','hdf5','z']
- lib_dirs = [netCDF4_libdir,HDF5_libdir]
+ libs = ['netcdf']
+ lib_dirs = [netCDF4_libdir]
inc_dirs = [netCDF4_incdir,HDF5_incdir]
# add szip to link if desired.

View File

@ -1,12 +1,21 @@
diff -up netcdf4-python-1.5.8rel/setup.py.norpath netcdf4-python-1.5.8rel/setup.py
--- netcdf4-python-1.5.8rel/setup.py.norpath 2021-10-31 07:25:17.000000000 -0600
+++ netcdf4-python-1.5.8rel/setup.py 2022-01-19 19:37:47.204865578 -0700
@@ -493,7 +493,7 @@ NETCDF4_DIR environment variable not set
if sys.platform == 'win32':
runtime_lib_dirs = []
diff -up netcdf4-python-1.1.4rel/setup.py.norpath netcdf4-python-1.1.4rel/setup.py
--- netcdf4-python-1.1.4rel/setup.py.norpath 2015-02-19 19:37:30.000000000 -0700
+++ netcdf4-python-1.1.4rel/setup.py 2015-02-21 20:07:31.075705534 -0700
@@ -313,7 +313,7 @@ else:
if has_cython and 'sdist' not in sys.argv[1:]:
sys.stdout.write('using Cython to compile netCDF4.pyx...\n')
# recompile netCDF4.pyx
- extensions = [Extension("netCDF4",["netCDF4.pyx"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs,runtime_library_dirs=lib_dirs),
+ extensions = [Extension("netCDF4",["netCDF4.pyx"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs),
Extension('netcdftime._datetime', ['netcdftime/_datetime.pyx'])]
# remove netCDF4.c file if it exists, so cython will recompile netCDF4.pyx.
# run for build *and* install (issue #263). Otherwise 'pip install' will
@@ -345,7 +345,7 @@ if has_cython and 'sdist' not in sys.arg
cmdclass = {'build_ext': build_ext}
else:
- runtime_lib_dirs = lib_dirs
+ runtime_lib_dirs = []
# use existing netCDF4.c, don't need cython.
- extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs,runtime_library_dirs=lib_dirs),
+ extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs),
Extension('netcdftime._datetime', ['netcdftime/_datetime.c'])]
cmdclass = {}
# Do not require numpy for just querying the package
# Taken from the h5py setup file.

View File

@ -1,41 +1,59 @@
%if 0%{?fedora}
%global with_python3 1
%else
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
%global srcname distribute
Name: netcdf4-python
Version: 1.6.1
Release: 1%{?dist}
Version: 1.1.6
Release: 2%{?dist}
Summary: Python/numpy interface to netCDF
Group: Development/Languages
License: MIT
URL: https://github.com/Unidata/netcdf4-python
Source0: https://github.com/Unidata/netcdf4-python/archive/v%{version}rel/%{name}-%{version}.tar.gz
Source0: https://github.com/Unidata/netcdf4-python/archive/v%{version}rel.tar.gz#/%{name}-%{version}.tar.gz
# No rpath for library
# http://code.google.com/p/netcdf4-python/issues/detail?id=138
Patch0: netcdf4-python-norpath.patch
# Don't link against hdf5 and z libraries
# http://code.google.com/p/netcdf4-python/issues/detail?id=139
Patch1: netcdf4-python-libs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if ! ( 0%{?fedora} >= 30 || 0%{?rhel} >= 8 )
BuildRequires: python2-devel
BuildRequires: python2-setuptools >= 18.0
# Added in 1.4.0
#BuildRequires: python2-cftime
BuildRequires: python2-Cython
BuildRequires: python2-dateutil
BuildRequires: Cython
BuildRequires: python-dateutil
# EL6 has python 2.6 and needs ordereddict
%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: python-ordereddict
%endif
BuildRequires: python2-numpy
%endif
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools >= 18
BuildRequires: python%{python3_pkgversion}-cftime
BuildRequires: python%{python3_pkgversion}-Cython
BuildRequires: python%{python3_pkgversion}-dateutil
BuildRequires: python%{python3_pkgversion}-numpy
BuildRequires: numpy
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-Cython
BuildRequires: python3-dateutil
BuildRequires: python3-numpy
%endif # if with_python3
BuildRequires: netcdf-devel
# python3 is default in fedora, but not EPEL
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: python%{python3_pkgversion}-netcdf4 = %{version}-%{release}
%else
Requires: python2-netcdf4 = %{version}-%{release}
# EL6 has python 2.6 and needs ordereddict
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: python-ordereddict
%endif
Requires: Cython
Requires: numpy
# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
%if 0%{?with_python3}
%filter_provides_in %{python3_sitearch}/.*\.so$
%endif # if with_python3
%filter_setup
}
%description
netCDF version 4 has many features not found in earlier versions of the
@ -52,44 +70,14 @@ types are not. Mixtures of compound and vlen data types (compound types
containing vlens, and vlens containing compound types) are not supported.
%package -n python2-netcdf4
%if 0%{?with_python3}
%package -n netcdf4-python3
Summary: Python/numpy interface to netCDF
# EL6 has python 2.6 and needs ordereddict
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: python-ordereddict
%endif
# Added in 1.4.0
#Requires: python2-cftime
Requires: python2-Cython
Requires: python2-numpy
%{?python_provide:%python_provide python2-netcdf4}
Provides: netcdf4-python2 = %{version}-%{release}
Group: Development/Languages
Requires: python3-Cython
Requires: python3-numpy
%description -n python2-netcdf4
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 modeled 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.
%package -n python%{python3_pkgversion}-netcdf4
Summary: Python/numpy interface to netCDF
Requires: python%{python3_pkgversion}-cftime
Requires: python%{python3_pkgversion}-Cython
Requires: python%{python3_pkgversion}-numpy
%{?python_provide:%python_provide python%{python3_pkgversion}-netcdf4}
Obsoletes: netcdf4-python%{python3_pkgversion} < 1.2.7-3
Provides: netcdf4-python%{python3_pkgversion} = %{version}-%{release}
%description -n python%{python3_pkgversion}-netcdf4
%description -n netcdf4-python3
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
@ -102,236 +90,74 @@ dimensions, groups and zlib data compression. All the new numeric data types
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.
%endif # with_python3
%prep
%setup -q -n %{name}-%{version}rel
%patch0 -p1 -b .norpath
%patch1 -p1 -b .libs
# This uses the network
rm test/tst_dap.py
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
%build
# Set to get libs from ncconfig to avoid directly linking to -lhdf5
export USE_NCCONFIG=1
%if ! ( 0%{?fedora} >= 30 || 0%{?rhel} >= 8 )
%py2_build
%endif
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%py3_build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
%endif # with_python3
%install
# python3 is default in fedora, but not EPEL7
%if 0%{?fedora} || 0%{?rhel} >= 8
%if ! ( 0%{?fedora} >= 30 || 0%{?rhel} >= 8 )
%py2_install
%endif
%py3_install
%else
%py3_install
%py2_install
%endif
rm -rf $RPM_BUILD_ROOT
# Must do the python3 install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_bindir}/*
popd
%endif # with_python3
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
%check
cd test
export NO_NET=1
%if ! ( 0%{?fedora} >= 30 || 0%{?rhel} >= 8 )
PYTHONPATH=$(echo ../build/lib.*%{python2_version}) %{__python2} run_all.py
%endif
%ifarch s390x
# FAIL: runTest (tst_compoundvar.VariablesTestCase) -> assert (cmptype4 == dtype4a) # data type should be aligned
PYTHONPATH=$(echo ../build/lib.linux-*) %{__python3} run_all.py || :
%else
PYTHONPATH=$(echo ../build/lib.linux-*) %{__python3} run_all.py
PYTHONPATH=$(echo ../build/lib.*) python run_all.py
%if 0%{?with_python3}
cd %{py3dir}/test
PYTHONPATH=$(echo ../build/lib.*) python3 run_all.py
%endif
%files
%license LICENSE
%doc Changelog COPYING docs examples README.md
%{_bindir}/nc3tonc4
%{_bindir}/nc4tonc3
%{_bindir}/ncinfo
%{python_sitearch}/*
%if ! ( 0%{?fedora} >= 30 || 0%{?rhel} >= 8 )
%files -n python2-netcdf4
%license LICENSE
%doc Changelog docs examples README.md
%{python2_sitearch}/*
%endif
%files -n python%{python3_pkgversion}-netcdf4
%license LICENSE
%doc Changelog docs examples README.md
%if 0%{?with_python3}
%files -n netcdf4-python3
%doc Changelog COPYING docs examples README.md
%{python3_sitearch}/*
%endif # with_python3
%changelog
* Fri Sep 23 2022 Orion Poplawski <orion@nwra.com> - 1.6.1-1
- Update to 1.6.1
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jun 26 2022 Orion Poplawski <orion@nwra.com> - 1.6.0-1
- Update to 1.6.0
* Mon Jun 20 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.5.8-3
- Fix FTBFS with the latest setuptools
Resolves: rhbz#2097125
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.5.8-2
- Rebuilt for Python 3.11
* Thu Jan 20 2022 Orion Poplawski <orion@nwra.com> - 1.5.8-1
- Update to 1.5.8
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 1.5.7-2
- Rebuild for hdf5 1.12.1
* Mon Aug 30 2021 Orion Poplawski <orion@nwra.com> - 1.5.7-1
- Update to 1.5.7
* Tue Aug 10 2021 Orion Poplawski <orion@nwra.com> - 1.5.6-4
- Rebuild for netcdf 4.8.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.5.6-2
- Rebuilt for Python 3.10
* Sun Feb 14 2021 Orion Poplawski <orion@nwra.com> - 1.5.6-1
- Update to 1.5.6
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 24 2021 Orion Poplawski <orion@nwra.com> - 1.5.5.1-1
- Update to 1.5.5.1
* Thu Sep 17 20:16:46 MDT 2020 Orion Poplawski <orion@nwra.com> - 1.5.4-1
- Update to 1.5.4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.5.3-3
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 24 2019 Orion Poplawski <orion@nwra.com> - 1.5.3-1
- Update to 1.5.3
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.2-2
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Tue Sep 10 2019 Orion Poplawski <orion@nwra.com> - 1.5.2-1
- Update to 1.5.2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.1.2-3
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon May 6 2019 Orion Poplawski <orion@nwra.com> - 1.5.1.2-1
- Update to 1.5.1.2
* Wed May 1 2019 Orion Poplawski <orion@nwra.com> - 1.5.1-1
- Update to 1.5.1
* Tue Apr 2 2019 Orion Poplawski <orion@nwra.com> - 1.5.0.1-1
- Update to 1.5.0.1
* Mon Mar 18 2019 Orion Poplawski <orion@nwra.com> - 1.4.3.2-2
- Rebuild for netcdf 4.6.3
* Sat Mar 9 2019 Orion Poplawski <orion@nwra.com> - 1.4.3.2-1
- Update to 1.4.3.2
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Oct 7 2018 Orion Poplawski <orion@nwra.com> - 1.3.1-1
- Update to 1.3.1
- Drop Python 2 in Fedora (bugz #1634978)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.9-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2.9-6
- Rebuilt for Python 3.7
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.2.9-5
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jun 20 2017 Orion Poplawski <orion@cora.nwra.com> - 1.2.9-1
- Update to 1.2.9
* Tue Mar 7 2017 Orion Poplawski <orion@cora.nwra.com> - 1.2-7-4
- Provide python-netcdf4
* Thu Mar 2 2017 Orion Poplawski <orion@cora.nwra.com> - 1.2-7-3
- Move python libraries into python?- sub-packages
- Make python3 default for Fedora
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Jan 8 2017 Orion Poplawski <orion@cora.nwra.com> - 1.2.7-1
- Update to 1.2.7
* Wed Dec 21 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.6-2
- Add upstream patch for python 3.6 support
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.6-2
- Rebuild for Python 3.6
* Sun Dec 11 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.6-1
- Update to 1.2.6
* Tue Nov 29 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.5-1
- Update to 1.2.5
- Enable python 3 for EPEL
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Fri Apr 15 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.4-1
- Update to 1.2.4
- Add pthon2/3-netcdf4 provides
* Fri Mar 11 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.3-1
- Update to 1.2.3
- Drop numpy patch
- Use %%license
* Sun Feb 7 2016 Orion Poplawski <orion@cora.nwra.com> - 1.2.2-1
- Update to 1.2.2
- Modernize spec
- Add upstream patch for numpy support
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 22 2016 Orion Poplawski <orion@cora.nwra.com> - 1.1.6-4
- Rebuild for netcdf 4.4.0
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (netcdf4-python-1.6.1.tar.gz) = 867fc264df7d2151cf3a684bd6f0f0c1e1efd48c3cae4c2c0f529697f3c2235c8bc87e859f88209ba59e33793a81899a12a794e5ca1522fa53cebf348592f022
d54669d962c95a15b6d789adf65afd2c netcdf4-python-1.1.6.tar.gz