netcdf4-python/netcdf4-python.spec

227 lines
7.2 KiB
RPMSpec
Raw Normal View History

2014-07-09 18:28:34 +00:00
%if 0%{?fedora}
2012-09-12 19:46:52 +00:00
%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.2.3
Release: 1%{?dist}
2012-09-12 19:46:52 +00:00
Summary: Python/numpy interface to netCDF
Group: Development/Languages
License: MIT
URL: https://github.com/Unidata/netcdf4-python
2014-12-22 04:43:43 +00:00
Source0: https://github.com/Unidata/netcdf4-python/archive/v%{version}rel.tar.gz#/%{name}-%{version}.tar.gz
2012-09-12 19:46:52 +00:00
# No rpath for library
2012-09-12 21:49:09 +00:00
# http://code.google.com/p/netcdf4-python/issues/detail?id=138
2012-09-12 19:46:52 +00:00
Patch0: netcdf4-python-norpath.patch
2012-09-12 21:30:21 +00:00
# Don't link against hdf5 and z libraries
2012-09-12 21:49:09 +00:00
# http://code.google.com/p/netcdf4-python/issues/detail?id=139
2012-09-12 21:30:21 +00:00
Patch1: netcdf4-python-libs.patch
2012-09-12 19:46:52 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python2-devel
2014-05-09 21:45:59 +00:00
BuildRequires: Cython
2014-05-09 21:35:39 +00:00
BuildRequires: python-dateutil
# EL6 has python 2.6 and needs ordereddict
%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: python-ordereddict
%endif
2012-09-12 19:46:52 +00:00
BuildRequires: numpy
%if 0%{?with_python3}
BuildRequires: python3-devel
2014-05-09 21:45:59 +00:00
BuildRequires: python3-Cython
2014-05-09 21:35:39 +00:00
BuildRequires: python3-dateutil
2012-09-12 19:46:52 +00:00
BuildRequires: python3-numpy
%endif # if with_python3
BuildRequires: netcdf-devel
# EL6 has python 2.6 and needs ordereddict
%if 0%{?rhel} && 0%{?rhel} <= 6
Requires: python-ordereddict
%endif
2014-05-09 21:45:59 +00:00
Requires: Cython
2012-09-12 19:46:52 +00:00
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
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.
%if 0%{?with_python3}
%package -n netcdf4-python3
Summary: Python/numpy interface to netCDF
Group: Development/Languages
2014-05-09 21:45:59 +00:00
Requires: python3-Cython
2012-09-12 19:46:52 +00:00
Requires: python3-numpy
%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
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.
%endif # with_python3
%prep
2014-12-22 04:43:43 +00:00
%setup -q -n %{name}-%{version}rel
2012-09-12 19:46:52 +00:00
%patch0 -p1 -b .norpath
2012-09-12 21:30:21 +00:00
%patch1 -p1 -b .libs
2014-12-22 04:43:43 +00:00
# This uses the network
rm test/tst_dap.py
2012-09-12 19:46:52 +00:00
%build
%py2_build
2012-09-12 19:46:52 +00:00
%if 0%{?with_python3}
%py3_build
2012-09-12 19:46:52 +00:00
%endif # with_python3
%install
# 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}
%py3_install
2012-09-12 19:46:52 +00:00
rm $RPM_BUILD_ROOT%{_bindir}/*
%endif # with_python3
%py2_install
2012-09-12 19:46:52 +00:00
%check
cd test
PYTHONPATH=$(echo ../build/lib.*%{python2_version}) %{__python2} run_all.py
%if 0%{?with_python3}
PYTHONPATH=$(echo ../build/lib.*%{python3_version}) %{__python3} run_all.py
%endif
2012-09-12 19:46:52 +00:00
%files
%license COPYING
%doc Changelog docs examples README.md
2012-09-12 19:46:52 +00:00
%{_bindir}/nc3tonc4
%{_bindir}/nc4tonc3
2014-02-07 05:47:59 +00:00
%{_bindir}/ncinfo
2012-09-12 19:46:52 +00:00
%{python_sitearch}/*
%if 0%{?with_python3}
%files -n netcdf4-python3
%license COPYING
%doc Changelog docs examples README.md
2012-09-12 19:46:52 +00:00
%{python3_sitearch}/*
%endif # with_python3
%changelog
* 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
2016-01-22 19:18:45 +00:00
* 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
2015-03-10 22:29:39 +00:00
* Tue Mar 10 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1.6-1
- Update to 1.1.6
2015-02-22 03:10:46 +00:00
* Sat Feb 21 2015 Orion Poplawski <orion@cora.nwra.com> - 1.1.4-1
- Update to 1.1.4
2014-12-22 04:43:43 +00:00
* Sun Dec 21 2014 Orion Poplawski <orion@cora.nwra.com> - 1.1.3-1
- Update to 1.1.3
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2014-07-09 18:56:53 +00:00
* Wed Jul 9 2014 Orion Poplawski <orion@cora.nwra.com> - 1.1.0-1
- Update to 1.1.0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-09 22:05:15 +00:00
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0.9-2
- Rebuild for Python 3.4
2014-05-09 21:26:21 +00:00
* Fri May 9 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0.9-1
- Update to 1.0.9
2014-05-09 21:28:51 +00:00
- Remove rpaths
2014-05-09 21:35:39 +00:00
- Add BR python{,3}-dateutil for tests
2014-05-09 21:45:59 +00:00
- Add BR/R on Cython
2014-05-09 21:26:21 +00:00
* Thu Mar 6 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0.8-1
- Update to 1.0.8
- Update URL/source to github
2014-02-07 05:47:59 +00:00
* Thu Feb 6 2014 Orion Poplawski <orion@cora.nwra.com> - 1.0.7-1
- Update to 1.0.7
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 21 2013 Orion Poplawski <orion@cora.nwra.com> - 1.0.2-1
- Update to 1.0.2
- Remove bundled ordereddict (Bug #913528), require it on EL6
- Run tests
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-3.fix1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2012-09-12 21:30:21 +00:00
* Wed Sep 12 2012 Orion Poplawski <orion@cora.nwra.com> - 1.0-2.fix1
- Add patch to link only against netcdf
2012-09-12 19:46:52 +00:00
* Thu May 24 2012 Orion Poplawski <orion@cora.nwra.com> - 1.0-1.fix1
- Update to 1.0fix1
* Thu Apr 5 2012 Orion Poplawski <orion@cora.nwra.com> - 0.9.9-1
- Update to 0.9.9
* Thu Sep 8 2011 Orion Poplawski <orion@cora.nwra.com> - 0.9.7-1
- Initial package