diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-02-07 09:45:26 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:22:02 +1100 |
commit | edd8c9ea2ab1e51d116135411df120ec1167e0e6 (patch) | |
tree | 56df7de2489aac910fdee79c4fc38e5f0c0e190c | |
parent | 15d0166340baea91f117ea977539894e7444ee6b (diff) | |
download | samba-edd8c9ea2ab1e51d116135411df120ec1167e0e6.tar.gz samba-edd8c9ea2ab1e51d116135411df120ec1167e0e6.tar.bz2 samba-edd8c9ea2ab1e51d116135411df120ec1167e0e6.zip |
s4-python: get ordering right on python paths
we need to have PYTHONARCHDIR first, as that is where we currently
install. That will minimise problems with upgrades from old installs.
We also don't need to add the path twice if PYTHONDIR is the same as
PYTHONARCHDIR (as happens on debian based systems)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/scripting/python/modules.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index f2a45a9893..9c6a008558 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -50,12 +50,14 @@ bool py_update_path() return false; } - if (!PySys_PathPrepend(py_path, dyn_PYTHONARCHDIR)) { + if (!PySys_PathPrepend(py_path, dyn_PYTHONDIR)) { return false; } - if (!PySys_PathPrepend(py_path, dyn_PYTHONDIR)) { - return false; + if (strcmp(dyn_PYTHONARCHDIR, dyn_PYTHONDIR) != 0) { + if (!PySys_PathPrepend(py_path, dyn_PYTHONARCHDIR)) { + return false; + } } return true; |