summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-16 15:33:58 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:34 +0100
commit1afe0549163bbc639ae1a030239c9ebcd1b922bf (patch)
tree967da56818175f109e818df9a1a72f1d1bdbf546 /source4/scripting
parenteb2c71912baceb1a6884ce143ae91f1e3d2a69fb (diff)
downloadsamba-1afe0549163bbc639ae1a030239c9ebcd1b922bf.tar.gz
samba-1afe0549163bbc639ae1a030239c9ebcd1b922bf.tar.bz2
samba-1afe0549163bbc639ae1a030239c9ebcd1b922bf.zip
r26474: Move credentials-specific kerberos file to credentials subsystem. Fixes missing symbols in some of the python bindings.
(This used to be commit e26d0fff6d40899113196ac35a86a9baa10cc9c2)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/config.mk4
-rw-r--r--source4/scripting/python/samba/__init__.py9
2 files changed, 13 insertions, 0 deletions
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.