dcavalca / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone

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

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