[Rpm-maint] [rpm-software-management/rpm] brp-python-bytecompile: Run a pre-flight find before invoking $default_python (#383)
Miro Hrončok
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
exit 0
fi
+# 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:
https://github.com/rpm-software-management/rpm/pull/383#pullrequestreview-90835938
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180123/737114cd/attachment.html>
More information about the Rpm-maint
mailing list