[netcdf4-python] Use 2to3
Orion Poplawski
orion at fedoraproject.org
Fri Feb 7 05:59:10 UTC 2014
commit feb706dba4e6466febaf8eb5ab6a88ac3f294730
Author: Orion Poplawski <orion at cora.nwra.com>
Date: Thu Feb 6 22:59:42 2014 -0700
Use 2to3
netcdf4-python.spec | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/netcdf4-python.spec b/netcdf4-python.spec
index 71d220c..f481961 100644
--- a/netcdf4-python.spec
+++ b/netcdf4-python.spec
@@ -32,6 +32,8 @@ BuildRequires: numpy
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-numpy
+# For 2to3
+BuildRequires: python-tools
%endif # if with_python3
BuildRequires: netcdf-devel
@@ -95,6 +97,7 @@ containing vlens, and vlens containing compound types) are not supported.
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
+2to3 --write --nobackups %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif # with_python3
More information about the scm-commits
mailing list