Accepting request 537608 from devel:languages:python
- use %python_clone instead of manual copying - drop shebang and executable from the included test setup.py instead of complicated post-install fixing OBS-URL: https://build.opensuse.org/request/show/537608 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pbr?expand=0&rev=32
This commit is contained in:
commit
b88608cb80
@ -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
|
Tue Aug 8 06:04:36 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
@ -67,29 +67,16 @@ information.
|
|||||||
# Get rid of ugly build-time deps that require network:
|
# Get rid of ugly build-time deps that require network:
|
||||||
sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py
|
sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py
|
||||||
|
|
||||||
# Fix wrong-script-interpreter
|
# drop interpreter from test setup.py
|
||||||
sed -i "s|#!/usr/bin/env python|#!/usr/bin/python|" pbr/tests/testpackage/setup.py
|
sed -i "1s|^#!/.*||" pbr/tests/testpackage/setup.py
|
||||||
|
chmod -x pbr/tests/testpackage/setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{python_expand %$python_install
|
%python_install
|
||||||
mv %{buildroot}%{_bindir}/pbr %{buildroot}%{_bindir}/pbr-%{$python_bin_suffix}
|
%python_clone -a %{buildroot}%{_bindir}/pbr
|
||||||
}
|
|
||||||
%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_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user