malmond / rpms / rpm

Forked from rpms/rpm 4 years ago
Clone

Blame SOURCES/compile-with-Platform-Python-binary-where-relevant.patch

043c42
From 682397a8e2758058f780cccd51b570d39415b9b2 Mon Sep 17 00:00:00 2001
043c42
From: Tomas Orsava <torsava@redhat.com>
043c42
Date: Tue, 3 Jul 2018 14:58:32 +0200
043c42
Subject: [PATCH] Compile with Platform-Python binary where relevant
043c42
043c42
---
043c42
 scripts/brp-python-bytecompile | 3 +++
043c42
 1 file changed, 3 insertions(+)
043c42
043c42
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
043c42
index 7ed1d7f..9d0a421 100644
043c42
--- a/scripts/brp-python-bytecompile
043c42
+++ b/scripts/brp-python-bytecompile
043c42
@@ -60,6 +60,9 @@ shopt -s nullglob
043c42
 for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]$"`;
043c42
 do
043c42
 	python_binary=/usr/bin/$(basename $python_libdir)
043c42
+	if [ "$python_binary" = "/usr/bin/python3.6" ]; then
043c42
+	    python_binary=/usr/libexec/platform-python
043c42
+	fi
043c42
 	real_libdir=${python_libdir/$RPM_BUILD_ROOT/}
043c42
 	echo "Bytecompiling .py files below $python_libdir using $python_binary"
043c42
 
043c42
-- 
043c42
2.14.4
043c42