Use 2to3
This commit is contained in:
parent
dc1a9e3da1
commit
feb706dba4
|
@ -32,6 +32,8 @@ BuildRequires: numpy
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-numpy
|
BuildRequires: python3-numpy
|
||||||
|
# For 2to3
|
||||||
|
BuildRequires: python-tools
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
BuildRequires: netcdf-devel
|
BuildRequires: netcdf-devel
|
||||||
|
|
||||||
|
@ -95,6 +97,7 @@ containing vlens, and vlens containing compound types) are not supported.
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
|
2to3 --write --nobackups %{py3dir}
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue