diff --git a/python-pygraphviz.changes b/python-pygraphviz.changes index 75584ef..560e58f 100644 --- a/python-pygraphviz.changes +++ b/python-pygraphviz.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 6 04:42:26 UTC 2017 - toddrme2178@gmail.com + +- Fix shebangs + ------------------------------------------------------------------- Wed May 17 21:43:00 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pygraphviz.spec b/python-pygraphviz.spec index 90a4511..1e476be 100644 --- a/python-pygraphviz.spec +++ b/python-pygraphviz.spec @@ -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