+# 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
+