From 1afe0549163bbc639ae1a030239c9ebcd1b922bf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 16 Dec 2007 15:33:58 +0100 Subject: r26474: Move credentials-specific kerberos file to credentials subsystem. Fixes missing symbols in some of the python bindings. (This used to be commit e26d0fff6d40899113196ac35a86a9baa10cc9c2) --- source4/scripting/python/config.mk | 4 ++++ source4/scripting/python/samba/__init__.py | 9 +++++++++ 2 files changed, 13 insertions(+) (limited to 'source4/scripting') diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index 9d972f7ee0..cf17a28a70 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -25,3 +25,7 @@ PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py pydoctor:: pythonmods LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES)) + +clean:: + @echo "Removing python modules" + @rm -f bin/python/* diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 00b82e1800..2c51440b0c 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -21,6 +21,15 @@ import os from misc import ldb_set_credentials +def _in_source_tree(): + print os.path.exists("%s/../../../samba4-skip" % os.path.dirname(__file__)) + +# When running, in-tree, make sure bin/python is in the PYTHONPATH +if _in_source_tree(): + import sys + dir = os.path.dirname(__file__) + sys.path.append("%s/../../../bin/python" % os.path.dirname(__file__)) + def Ldb(url, session_info=None, credentials=None, modules_dir=None): """Open a Samba Ldb file. -- cgit