Module: check_mk
Branch: master
Commit: c459b6b19e60fbd3336643e3d58afac1e6dd9a38
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c459b6b19e60fb…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Mon Jan 22 15:10:03 2018 +0100
5492 FIX Prefer local/lib over lib in the PYTHONPATH
Locally installed Python packages under $OMD_ROOT/local/lib/python
will now be prefered over shipped packages in $OMD_ROOT/lib/python.
Change-Id: I08cb9144cc26ba3805c6ecf5d9e07d2947664243
---
.werks/5492 | 11 +++++++++++
omd/packages/omd/omd | 2 +-
omd/packages/omd/skel/.profile | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/5492 b/.werks/5492
new file mode 100644
index 0000000..b1552ef
--- /dev/null
+++ b/.werks/5492
@@ -0,0 +1,11 @@
+Title: Prefer local/lib over lib in the PYTHONPATH
+Level: 1
+Component: packages
+Compatible: compat
+Edition: cre
+Version: 1.5.0i3
+Date: 1516870075
+Class: fix
+
+Locally installed Python packages under $OMD_ROOT/local/lib/python
+will now be prefered over shipped packages in $OMD_ROOT/lib/python.
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index ef3f0ea..d419094 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -2300,7 +2300,7 @@ def set_environment():
putenv("LD_LIBRARY_PATH", "%s/local/lib:%s/lib" % (g_sitedir,
g_sitedir))
putenv("HOME", g_sitedir)
- putenv("PYTHONPATH", "%s/lib/python:%s/local/lib/python" %
(g_sitedir, g_sitedir))
+ putenv("PYTHONPATH", "%s/local/lib/python:%s/lib/python" %
(g_sitedir, g_sitedir))
# allow user to define further environment variable in ~/etc/environment
envfile = g_sitedir + "/etc/environment"
diff --git a/omd/packages/omd/skel/.profile b/omd/packages/omd/skel/.profile
index 8efe3a0..7ee3d55 100644
--- a/omd/packages/omd/skel/.profile
+++ b/omd/packages/omd/skel/.profile
@@ -11,7 +11,7 @@ export PATH="$OMD_ROOT/lib/perl5/bin:$PATH"
export MODULEBUILDRC="$OMD_ROOT/.modulebuildrc"
export PERL_MM_OPT=INSTALL_BASE="$OMD_ROOT/local/lib/perl5/"
export MANPATH="$OMD_ROOT/share/man:$MANPATH"
-export PYTHONPATH="$OMD_ROOT/lib/python:$OMD_ROOT/local/lib/python"
+export PYTHONPATH="$OMD_ROOT/local/lib/python:$OMD_ROOT/lib/python"
export MAILRC="$OMD_ROOT/etc/mail.rc"
# Make the python requests module trust the CAs configured in Check_MK