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
This commit is contained in:
Todd R 2017-07-10 19:35:36 +00:00 committed by Git OBS Bridge
parent f8ee4505e9
commit a5a0a2c3bc
2 changed files with 22 additions and 1 deletions

View File

@ -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

View File

@ -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