diff --git a/python-PyWavelets.changes b/python-PyWavelets.changes index c614496..f9dc1c9 100644 --- a/python-PyWavelets.changes +++ b/python-PyWavelets.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 6 04:34:02 UTC 2017 - toddrme2178@gmail.com + +- Fix shebangs + ------------------------------------------------------------------- Wed May 24 13:46:05 UTC 2017 - toddrme2178@gmail.com diff --git a/python-PyWavelets.spec b/python-PyWavelets.spec index 7fc0f02..a680549 100644 --- a/python-PyWavelets.spec +++ b/python-PyWavelets.spec @@ -84,6 +84,9 @@ chmod a-x *.rst chmod a-x *.txt chmod a-x PyWavelets.egg-info/* +# Fix wrong-script-interpreter +find demo -name '*.py' -exec sed -i "s|#!/usr/bin/env python|#!%__python3|" {} \; + # Remove unneeded shebangs sed -i '1{\@^#!/usr/bin/env python@d}' pywt/data/create_dat.py @@ -98,7 +101,16 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%{python_expand pushd %{buildroot}%{$python_sitearch} +# Fix wrong-script-interpreter +sed -i "s|#!/usr/bin/env python|#!%__$python|" pywt/tests/*.py +# Deduplicating files can generate a RPMLINT warning for pyc mtime +$python -m compileall -d %{$python_sitearch} pywt/tests/ +$python -O -m compileall -d %{$python_sitearch} pywt/tests/ +%fdupes . +popd +} # Create docs. These need the package to already be built and installed PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}" make -C doc PAPER=letter html