diff --git a/python-editor.spec b/python-editor.spec index ddc887c..65841f3 100644 --- a/python-editor.spec +++ b/python-editor.spec @@ -47,9 +47,11 @@ Programmatically open an editor, capture the result. %setup -q -n %{pypi_name}-%{upstream_version} rm -rf %{pypi_name}.egg-info # Change shebang according to Python version +%if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' %{py3dir}/editor.py +%endif sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python2}=' editor.py %build