diff --git a/python-pbr.changes b/python-pbr.changes index a7f1010..3e6a2d8 100644 --- a/python-pbr.changes +++ b/python-pbr.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 30 16:09:24 UTC 2017 - jmatejek@suse.com + +- use %python_clone instead of manual copying +- drop shebang and executable from the included test setup.py + instead of complicated post-install fixing + ------------------------------------------------------------------- Tue Aug 8 06:04:36 UTC 2017 - tbechtold@suse.com diff --git a/python-pbr.spec b/python-pbr.spec index 47c773a..b736ab9 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -67,29 +67,16 @@ information. # Get rid of ugly build-time deps that require network: sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py -# Fix wrong-script-interpreter -sed -i "s|#!/usr/bin/env python|#!/usr/bin/python|" pbr/tests/testpackage/setup.py +# drop interpreter from test setup.py +sed -i "1s|^#!/.*||" pbr/tests/testpackage/setup.py +chmod -x pbr/tests/testpackage/setup.py %build %python_build %install -%{python_expand %$python_install -mv %{buildroot}%{_bindir}/pbr %{buildroot}%{_bindir}/pbr-%{$python_bin_suffix} -} -%prepare_alternative pbr - -# Fix wrong-script-interpreter -%python_expand sed -i "s|#!/usr/bin/python|#!%__$python|" %{buildroot}%{$python_sitelib}/pbr/tests/testpackage/setup.py - -%if %have_python2 -%py_compile %{buildroot}%{python2_sitelib}/pbr/tests/testpackage/ -%py_compile -O %{buildroot}%{python2_sitelib}/pbr/tests/testpackage/ -%endif -%if %have_python3 -%py3_compile %{buildroot}%{python3_sitelib}/pbr/tests/testpackage/ -%py3_compile -O %{buildroot}%{python3_sitelib}/pbr/tests/testpackage/ -%endif +%python_install +%python_clone -a %{buildroot}%{_bindir}/pbr %python_expand %fdupes %{buildroot}%{$python_sitelib}