From ac08f40f34b9080031947f8618b37c535cc6e89c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 24 Nov 2024 21:55:22 -0500 Subject: [PATCH] Tidy up %prep --- python-zmq.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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