[jhbuild/wip/path-env] python path: work around a bug in a Fedora patch
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/path-env] python path: work around a bug in a Fedora patch
- Date: Fri, 14 Mar 2014 04:51:51 +0000 (UTC)
commit 95564918f25d8ad09aa329f8358ceb797a5320ad
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Mar 13 23:49:43 2014 -0400
python path: work around a bug in a Fedora patch
The Fedora python package patches the get_python_lib() function in
distutils.sysconfig, breaking its API by returning different values,
depending on plat_specific, even if prefix is given.
See https://bugzilla.redhat.com/show_bug.cgi?id=1076293.
Work around that by checking for the different path and adding it to the
path as well.
jhbuild/sitecustomize/sitecustomize.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/sitecustomize/sitecustomize.py b/jhbuild/sitecustomize/sitecustomize.py
index f1b7e28..4ae2a77 100644
--- a/jhbuild/sitecustomize/sitecustomize.py
+++ b/jhbuild/sitecustomize/sitecustomize.py
@@ -11,3 +11,10 @@ if 'JHBUILD_PREFIXES' in os.environ:
sys.path.remove(sitedir)
sys.path.insert(1, sitedir)
+
+ # work around https://bugzilla.redhat.com/show_bug.cgi?id=1076293
+ sitedir2 = sysconfig.get_python_lib(1, prefix=prefix)
+ if sitedir2 != sitedir:
+ if sitedir2 in sys.path:
+ sys.path.remove(sitedir2)
+ sys.path.insert(1, sitedir2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]