14
0

Accepting request 514808 from home:TheBlackCat:branches:devel:languages:python

Fix shebangs

OBS-URL: https://build.opensuse.org/request/show/514808
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygraphviz?expand=0&rev=12
This commit is contained in:
Todd R
2017-08-11 13:17:05 +00:00
committed by Git OBS Bridge
parent 1654d2d3ff
commit 63982c2eed
2 changed files with 17 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# Needed even without tests
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
Requires: graphviz >= 2.16
%python_subpackages
@@ -64,8 +65,17 @@ This package provides documentation and help files for %{name}
%install
export CFLAGS="%{optflags}"
%python_exec setup.py install -O1 --force --root %{buildroot} --prefix %{_prefix} --include-path %{_includedir}/graphviz/ --library-path %{_libdir}/graphviz/
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%python_expand chmod +x %{buildroot}%{$python_sitearch}/pygraphviz/tests/test.py
%{python_expand pushd %{buildroot}%{$python_sitearch}
# Fix wrong-script-interpreter
sed -i "s|#!/usr/bin/env python|#!%__$python|" pygraphviz/tests/test.py
chmod a+x pygraphviz/tests/test.py
# Deduplicating files can generate a RPMLINT warning for pyc mtime
$python -m compileall -d %{$python_sitearch} pygraphviz/tests/
$python -O -m compileall -d %{$python_sitearch} pygraphviz/tests/
%fdupes .
popd
}
%if %{with tests}
%check