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:
@ -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")
|
||||
|
Reference in New Issue
Block a user