From a5a0a2c3bcbc2eb709503ba8082995bb20a5ee8cbcd16b45f25b22dd577ba9e6 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 10 Jul 2017 19:35:36 +0000 Subject: [PATCH] Accepting request 509274 from home:TheBlackCat:branches:devel:languages:python Fix wrong-script-interpreter rpmlint error. OBS-URL: https://build.opensuse.org/request/show/509274 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pbr?expand=0&rev=72 --- python-pbr.changes | 5 +++++ python-pbr.spec | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) 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