diff --git a/python-zmq.spec b/python-zmq.spec index 4f13440..9819eb0 100644 --- a/python-zmq.spec +++ b/python-zmq.spec @@ -99,19 +99,19 @@ This package contains the test suite for the Python bindings. %prep -%setup -q -n pyzmq-%{version} +%autosetup -p1 -n pyzmq-%{version} # remove bundled libraries rm -rv bundled/ -# remove the Cython .c files in order to regenerate them: -find zmq -name "*.c" -delete +# Remove any Cython-generated .c files in order to regenerate them: +find zmq -name '*.c' -print -delete -# remove shebangs -grep -lr "^#\!/usr/bin/env python" | xargs sed -i "1d" - -# remove excecutable bits -find . -type f -executable | xargs chmod -x +# Remove shebangs from non-script sources. The find-then-modify pattern +# preserves mtimes on sources that did not need to be modified. +find 'src' -type f -name '*.py' \ + -exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | + xargs -r sed -r -i '1{/^#!/d}' # BUG: A file is licensed Apache-2.0, but the license text is not distributed # https://github.com/zeromq/pyzmq/issues/2048