From feb706dba4e6466febaf8eb5ab6a88ac3f294730 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 6 Feb 2014 22:59:42 -0700 Subject: [PATCH] Use 2to3 --- netcdf4-python.spec | 3 +++ 1 file changed, 3 insertions(+) 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