17
0

Accepting request 533133 from devel:languages:python

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/533133
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyWavelets?expand=0&rev=2
This commit is contained in:
2017-10-13 12:14:51 +00:00
committed by Git OBS Bridge
parent b5274614fe
commit 3e0a9e2bb2
2 changed files with 18 additions and 1 deletions

View File

@@ -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