From 2f8e5fc5f107fafe18e20e00e11b5d8e32866093 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 21 Feb 2013 09:33:16 -0700 Subject: [PATCH] Update to 1.0.2 Remove bundled ordereddict (Bug #913528), require it on EL6 Run tests --- .gitignore | 1 + netcdf4-python-norpath.patch | 8 ++++---- netcdf4-python.spec | 31 +++++++++++++++++++++++++------ sources | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 278ce1f..cfab410 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /netCDF4-1.0fix1.tar.gz +/netCDF4-1.0.2.tar.gz diff --git a/netcdf4-python-norpath.patch b/netcdf4-python-norpath.patch index bd73655..599ae89 100644 --- a/netcdf4-python-norpath.patch +++ b/netcdf4-python-norpath.patch @@ -1,6 +1,6 @@ -diff -up netCDF4-1.0/setup.py.norpath netCDF4-1.0/setup.py ---- netCDF4-1.0/setup.py.norpath 2012-05-12 08:04:26.000000000 -0600 -+++ netCDF4-1.0/setup.py 2012-05-23 16:38:16.376417441 -0600 +diff -up netCDF4-1.0.2/setup.py.norpath netCDF4-1.0.2/setup.py +--- netCDF4-1.0.2/setup.py.norpath 2012-11-21 07:20:13.000000000 -0700 ++++ netCDF4-1.0.2/setup.py 2013-02-21 08:57:47.255829122 -0700 @@ -163,7 +163,7 @@ NETCDF4_DIR environment variable not set lib_dirs.append(szip_libdir) inc_dirs.append(szip_incdir) @@ -9,4 +9,4 @@ diff -up netCDF4-1.0/setup.py.norpath netCDF4-1.0/setup.py +extensions = [Extension("netCDF4",["netCDF4.c"],libraries=libs,library_dirs=lib_dirs,include_dirs=inc_dirs)] setup(name = "netCDF4", - version = "1.0", + version = "1.0.2", diff --git a/netcdf4-python.spec b/netcdf4-python.spec index 09599d3..cf72433 100644 --- a/netcdf4-python.spec +++ b/netcdf4-python.spec @@ -7,14 +7,14 @@ %global srcname distribute Name: netcdf4-python -Version: 1.0 -Release: 3.fix1%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: Python/numpy interface to netCDF Group: Development/Languages License: MIT URL: http://code.google.com/p/netcdf4-python/ -Source0: http://netcdf4-python.googlecode.com/files/netCDF4-%{version}fix1.tar.gz +Source0: http://netcdf4-python.googlecode.com/files/netCDF4-%{version}.tar.gz # No rpath for library # http://code.google.com/p/netcdf4-python/issues/detail?id=138 Patch0: netcdf4-python-norpath.patch @@ -24,6 +24,10 @@ Patch1: netcdf4-python-libs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python2-devel +# EL6 has python 2.6 and needs ordereddict +%if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: python-ordereddict +%endif BuildRequires: numpy %if 0%{?with_python3} BuildRequires: python3-devel @@ -31,6 +35,10 @@ 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 Requires: numpy # we don't want to provide private python extension libs @@ -83,6 +91,8 @@ containing vlens, and vlens containing compound types) are not supported. %setup -q -n netCDF4-%{version} %patch0 -p1 -b .norpath %patch1 -p1 -b .libs +# Remove bundled ordereddict +rm ordereddict.py %if 0%{?with_python3} rm -rf %{py3dir} @@ -118,12 +128,16 @@ popd %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT -%clean -rm -rf $RPM_BUILD_ROOT +%check +cd test +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 -%defattr(-,root,root,-) %doc Changelog COPYING docs examples README %{_bindir}/nc3tonc4 %{_bindir}/nc4tonc3 @@ -137,6 +151,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Feb 21 2013 Orion Poplawski - 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 - 1.0-3.fix1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index d7aefeb..a7edcb8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9200f66aa48ce8dc257db5b4b2cf0512 netCDF4-1.0fix1.tar.gz +22bfe58aefa177f7ab34dd12e70c7679 netCDF4-1.0.2.tar.gz