Provide for PREFIX to be set to the bundle when the platform is darwin. Bundle is detected by differing sys.prefix and sys.exec_prefix, indicating that sys.prefix has been changed (which it is, in rungramps.py).

svn: r17347
This commit is contained in:
John Ralls
2011-04-29 21:54:38 +00:00
parent 8a2dd3d050
commit eb7b9fa565
2 changed files with 6 additions and 2 deletions

View File

@@ -80,10 +80,13 @@ APP_VCARD = ["text/x-vcard", "text/x-vcalendar"]
# system paths
#
#-------------------------------------------------------------------------
if sys.platform == "win32" or sys.platform == "darwin":
if sys.platform == "win32":
if sys.prefix == os.path.dirname(os.getcwd()):
PREFIXDIR = sys.prefix
SYSCONFDIR = os.path.join(sys.prefix, "etc")
elif sys.platform == "darwin" and sys.prefix != sys.exec_prefix:
PREFIXDIR = sys.prefix
SYSCONFDIR = os.path.join(sys.prefix, "etc")
else:
PREFIXDIR = "@prefix@"
SYSCONFDIR = "@sysconfdir@"