forked from pool/python-pygraphviz
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user