[Rpm-maint] [rpm-software-management/rpm] brp-python-bytecompile: Run a pre-flight find before invoking $default_python (#383)
notifications at github.com
Tue Jan 23 14:15:34 UTC 2018
hroncok commented on this pull request.
> @@ -87,6 +87,10 @@ if [ ! -x "$default_python" ]; then
+# Figure out if there are files to be bytecompiled with the default_python at all
+# this prevents unnecessary default_python invocation
+find "$RPM_BUILD_ROOT" -type f -name "*.py" | grep -Ev "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" || exit 0
Note that the regex violates the DRY principle. However it was already repeated twice and I didn't want to add an extra layer of complexity by putting it in a variable instead. However I can do that if you'd like.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rpm-maint