Move python libraries into python?- sub-packages
Make python3 default for Fedora
This commit is contained in:
parent
de25804a09
commit
5ed2f39cb4
@ -1,8 +1,6 @@
|
|||||||
%global with_python3 1
|
|
||||||
|
|
||||||
Name: netcdf4-python
|
Name: netcdf4-python
|
||||||
Version: 1.2.7
|
Version: 1.2.7
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Python/numpy interface to netCDF
|
Summary: Python/numpy interface to netCDF
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -24,30 +22,17 @@ BuildRequires: python-dateutil
|
|||||||
BuildRequires: python-ordereddict
|
BuildRequires: python-ordereddict
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: numpy
|
BuildRequires: numpy
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-Cython
|
BuildRequires: python%{python3_pkgversion}-Cython
|
||||||
BuildRequires: python%{python3_pkgversion}-dateutil
|
BuildRequires: python%{python3_pkgversion}-dateutil
|
||||||
BuildRequires: python%{python3_pkgversion}-numpy
|
BuildRequires: python%{python3_pkgversion}-numpy
|
||||||
%endif # if with_python3
|
|
||||||
BuildRequires: netcdf-devel
|
BuildRequires: netcdf-devel
|
||||||
|
# python3 is default in fedora, but not EPEL
|
||||||
# EL6 has python 2.6 and needs ordereddict
|
%if 0%{?fedora}
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
Requires: python%{python3_pkgversion}-netcdf4 = %{version}-%{release}
|
||||||
Requires: python-ordereddict
|
%else
|
||||||
|
Requires: python2-netcdf4 = %{version}-%{release}
|
||||||
%endif
|
%endif
|
||||||
Requires: Cython
|
|
||||||
Requires: numpy
|
|
||||||
Provides: python2-netcdf4 = %{version}-%{release}
|
|
||||||
|
|
||||||
# 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
|
%description
|
||||||
netCDF version 4 has many features not found in earlier versions of the
|
netCDF version 4 has many features not found in earlier versions of the
|
||||||
@ -64,15 +49,41 @@ types are not. Mixtures of compound and vlen data types (compound types
|
|||||||
containing vlens, and vlens containing compound types) are not supported.
|
containing vlens, and vlens containing compound types) are not supported.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%package -n python2-netcdf4
|
||||||
%package -n netcdf4-python3
|
|
||||||
Summary: Python/numpy interface to netCDF
|
Summary: Python/numpy interface to netCDF
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: python%{python3_pkgversion}-Cython
|
# EL6 has python 2.6 and needs ordereddict
|
||||||
Requires: python%{python3_pkgversion}-numpy
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
Provides: python%{python3_pkgversion}-netcdf4 = %{version}-%{release}
|
Requires: python-ordereddict
|
||||||
|
%endif
|
||||||
|
Requires: Cython
|
||||||
|
Requires: numpy
|
||||||
|
Provides: netcdf4-python2 = %{version}-%{release}
|
||||||
|
|
||||||
%description -n netcdf4-python3
|
%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
|
||||||
|
Group: Development/Languages
|
||||||
|
Requires: python%{python3_pkgversion}-Cython
|
||||||
|
Requires: python%{python3_pkgversion}-numpy
|
||||||
|
Obsoletes: netcdf4-python%{python3_pkgversion} < 1.2.7-3
|
||||||
|
Provides: netcdf4-python%{python3_pkgversion} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python%{python3_pkgversion}-netcdf4
|
||||||
netCDF version 4 has many features not found in earlier versions of the
|
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
|
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 in both the new netCDF 4 and the old netCDF 3 format, and can create
|
||||||
@ -85,7 +96,6 @@ 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
|
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
|
types are not. Mixtures of compound and vlen data types (compound types
|
||||||
containing vlens, and vlens containing compound types) are not supported.
|
containing vlens, and vlens containing compound types) are not supported.
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -98,49 +108,48 @@ rm test/tst_dap.py
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Must do the python3 install first because the scripts in /usr/bin are
|
# python3 is default in fedora, but not EPEL
|
||||||
# overwritten with every setup.py install (and we want the python2 version
|
%if 0%{?fedora}
|
||||||
# to be the default for now).
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%py3_install
|
|
||||||
rm $RPM_BUILD_ROOT%{_bindir}/*
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%py2_install
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
%else
|
||||||
|
%py3_install
|
||||||
|
%py2_install
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd test
|
cd test
|
||||||
PYTHONPATH=$(echo ../build/lib.*%{python2_version}) %{__python2} run_all.py
|
PYTHONPATH=$(echo ../build/lib.*%{python2_version}) %{__python2} run_all.py
|
||||||
%if 0%{?with_python3}
|
|
||||||
PYTHONPATH=$(echo ../build/lib.*%{python3_version}) %{__python3} run_all.py
|
PYTHONPATH=$(echo ../build/lib.*%{python3_version}) %{__python3} run_all.py
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc Changelog docs examples README.md
|
|
||||||
%{_bindir}/nc3tonc4
|
%{_bindir}/nc3tonc4
|
||||||
%{_bindir}/nc4tonc3
|
%{_bindir}/nc4tonc3
|
||||||
%{_bindir}/ncinfo
|
%{_bindir}/ncinfo
|
||||||
%{python_sitearch}/*
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%files -n python2-netcdf4
|
||||||
%files -n netcdf4-python3
|
%license COPYING
|
||||||
|
%doc Changelog docs examples README.md
|
||||||
|
%{python2_sitearch}/*
|
||||||
|
|
||||||
|
%files -n python%{python3_pkgversion}-netcdf4
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc Changelog docs examples README.md
|
%doc Changelog docs examples README.md
|
||||||
%{python3_sitearch}/*
|
%{python3_sitearch}/*
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user