All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3 1/2] python3: do not hardcode "lib" into site-packages search path
@ 2017-03-27 12:53 Alexander Kanavin
  2017-03-27 12:53 ` [PATCHv3 2/2] dnf: move the entire dnf/rpm4 stack to Python 3 Alexander Kanavin
  2017-03-27 12:58 ` [PATCHv3 1/2] python3: do not hardcode "lib" into site-packages search path Burton, Ross
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Kanavin @ 2017-03-27 12:53 UTC (permalink / raw)
  To: openembedded-core

This was not working in multilib or x32 setups and amazingly, was not
noticed until now.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 ...-not-hardcode-lib-into-site-packages-path.patch | 33 ++++++++++++++++++++++
 meta/recipes-devtools/python/python3_3.5.2.bb      |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-into-site-packages-path.patch

diff --git a/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-into-site-packages-path.patch b/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-into-site-packages-path.patch
new file mode 100644
index 00000000000..286ba352b0a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-Do-not-hardcode-lib-into-site-packages-path.patch
@@ -0,0 +1,33 @@
+From f2bb0a0e3c4eef4fa3853920ecc1cc59618f1409 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 27 Mar 2017 15:33:43 +0300
+Subject: [PATCH] Do not hardcode "lib" into site-packages path.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Lib/site.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/site.py b/Lib/site.py
+index 3f78ef5..511931e 100644
+--- a/Lib/site.py
++++ b/Lib/site.py
+@@ -303,12 +303,12 @@ def getsitepackages(prefixes=None):
+         seen.add(prefix)
+ 
+         if os.sep == '/':
+-            sitepackages.append(os.path.join(prefix, "lib",
++            sitepackages.append(os.path.join(prefix, sys.lib,
+                                         "python" + sys.version[:3],
+                                         "site-packages"))
+         else:
+             sitepackages.append(prefix)
+-            sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
++            sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
+         if sys.platform == "darwin":
+             # for framework builds *only* we add the standard Apple
+             # locations.
+-- 
+2.11.0
+
diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb b/meta/recipes-devtools/python/python3_3.5.2.bb
index 2ff7c9e2780..43cc125b506 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -37,6 +37,7 @@ SRC_URI += "\
             file://configure.ac-fix-LIBPL.patch \
             file://python3-fix-CVE-2016-1000110.patch \
             file://upstream-random-fixes.patch \
+            file://0001-Do-not-hardcode-lib-into-site-packages-path.patch \
            "
 SRC_URI[md5sum] = "8906efbacfcdc7c3c9198aeefafd159e"
 SRC_URI[sha256sum] = "0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-27 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 12:53 [PATCHv3 1/2] python3: do not hardcode "lib" into site-packages search path Alexander Kanavin
2017-03-27 12:53 ` [PATCHv3 2/2] dnf: move the entire dnf/rpm4 stack to Python 3 Alexander Kanavin
2017-03-27 22:53   ` Paul Eggleton
2017-03-27 12:58 ` [PATCHv3 1/2] python3: do not hardcode "lib" into site-packages search path Burton, Ross
2017-03-27 13:15   ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.