chantra / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
5523e9
--- rpm-4.11.3/scripts/brp-python-bytecompile.old	2014-02-05 14:04:02.000000000 +0100
5523e9
+++ rpm-4.11.3/scripts/brp-python-bytecompile	2019-03-25 09:43:06.272804044 +0100
5523e9
@@ -6,12 +6,6 @@
5523e9
 	exit 0
5523e9
 fi
5523e9
 
5523e9
-# If we don't have a python interpreter, avoid changing anything.
5523e9
-default_python=${1:-/usr/bin/python}
5523e9
-if [ ! -x "$default_python" ]; then
5523e9
-	exit 0
5523e9
-fi
5523e9
-
5523e9
 # Figure out how deep we need to descend.  We could pick an insanely high
5523e9
 # number and hope it's enough, but somewhere, somebody's sure to run into it.
5523e9
 depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \
5523e9
@@ -55,6 +49,11 @@
5523e9
 	fi
5523e9
 done
5523e9
 
5523e9
+# If we don't have a python interpreter, avoid changing anything.
5523e9
+default_python=${1:-/usr/bin/python}
5523e9
+if [ ! -x "$default_python" ]; then
5523e9
+	exit 0
5523e9
+fi
5523e9
 
5523e9
 # Handle other locations in the filesystem using the default python
5523e9
 # implementation: