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