diff --git a/python-pbr.changes b/python-pbr.changes index 879854f..a2f6478 100644 --- a/python-pbr.changes +++ b/python-pbr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 10 18:42:12 UTC 2017 - toddrme2178@gmail.com + +- Fix wrong-script-interpreter rpmlint error. + ------------------------------------------------------------------- Thu Jun 29 16:16:36 UTC 2017 - tbechtold@suse.com diff --git a/python-pbr.spec b/python-pbr.spec index 787131f..d6f628d 100644 --- a/python-pbr.spec +++ b/python-pbr.spec @@ -67,6 +67,9 @@ 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 + %build %python_build @@ -75,7 +78,20 @@ sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py mv %{buildroot}%{_bindir}/pbr %{buildroot}%{_bindir}/pbr-%{$python_bin_suffix} } %prepare_alternative pbr -%fdupes %{buildroot}%{_prefix} + +# 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_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} %check