def get_siteconf():
- mic_path = os.path.dirname(__file__)
-
- m = re.match(r"(?P<prefix>.*)\/lib(64)?\/.*", mic_path)
- if m and m.group('prefix') != "/usr":
- return os.path.join(m.group('prefix'), "etc/mic/mic.conf")
-
- return DEFAULT_GSITECONF
+ if hasattr(sys, 'real_prefix'):
+ return os.path.join(sys.prefix, "etc/mic/mic.conf")
+ else:
+ return DEFAULT_GSITECONF
class ConfigMgr(object):
prefer_backends = ["zypp", "yum"]