-%{__python} setup.py install \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
-
-%py_comp $RPM_BUILD_ROOT%{_datadir}/%{name}
-%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{name}
-# requires patching(?)
-#%%py_postclean %{_datadir}/%{name}
-
-# Replace '#!/usr/bin/env python2' with '#!/usr/bin/python2'
-# The format is ideal for upstream, but not a distro. See:
-# https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
-for f in $(find $RPM_BUILD_ROOT -type f -executable -print); do
- sed -i "1 s|^#!/usr/bin/env python2|#!%{__python}|" $f || :
-done