summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-20 17:46:39 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-20 17:46:39 +0200
commit0714e23971f701999f69ed85c65e4f3f33153a97 (patch)
tree2f4fd785c69cde5e55bb668dd0de924f17a6f34b /source4/scripting
parenta87561613af3e54503f80d559227f836c17ed263 (diff)
downloadsamba-0714e23971f701999f69ed85c65e4f3f33153a97.tar.gz
samba-0714e23971f701999f69ed85c65e4f3f33153a97.tar.bz2
samba-0714e23971f701999f69ed85c65e4f3f33153a97.zip
provision: Look for Samba prefix a bit harder.
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 804bbe78ea..cfba780baf 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -66,10 +66,12 @@ __docformat__ = "restructuredText"
def find_setup_dir():
"""Find the setup directory used by provision."""
import sys
- for suffix in ["share/setup", "share/samba/setup", "setup"]:
- ret = os.path.join(sys.prefix, suffix)
- if os.path.isdir(ret):
- return ret
+ for prefix in [sys.prefix,
+ os.path.join(os.path.dirname(__file__), "../../../..")]:
+ for suffix in ["share/setup", "share/samba/setup", "setup"]:
+ ret = os.path.join(prefix, suffix)
+ if os.path.isdir(ret):
+ return ret
# In source tree
dirname = os.path.dirname(__file__)
ret = os.path.join(dirname, "../../../setup")