1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

provision: Look for Samba prefix a bit harder.

This commit is contained in:
Jelmer Vernooij
2010-06-20 17:46:39 +02:00
parent a87561613a
commit 0714e23971

View File

@ -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")