1
0

Make where() work with OSX app bundles

MEIPASS is PythonInstaller specific and won't work for py2app

	modified:   lib/util.py
	modified:   .gitignore
	modified:   lib/util.py
	modified:   setup-release.py
This commit is contained in:
Maran
2015-01-27 12:22:28 +01:00
parent 2bf32880e8
commit fd8a931608
3 changed files with 9 additions and 3 deletions

View File

@@ -66,8 +66,13 @@ def data_dir():
if __builtin__.use_local_modules:
return local_data_dir()
else:
if getattr(sys, 'frozen'):
basedir = sys._MEIPASS
is_frozen = getattr(sys, 'frozen')
if is_frozen:
if is_frozen == "macosx_app":
basedir = os.path.abspath(".")
else:
basedir = sys._MEIPASS
return os.path.join(basedir, 'data')
else:
return appdata_dir()