guetzli-recursively-gui/.eggs/py2app-0.12-py3.6.egg/py2app/bootstrap/setup_pkgresource.py
2017-04-20 00:57:59 +02:00

14 lines
440 B
Python

def _setup_pkgresources():
import pkg_resources
import os, plistlib
pl = plistlib.readPlist(os.path.join(
os.path.dirname(os.getenv('RESOURCEPATH')), "Info.plist"))
appname = pl.get('CFBundleIdentifier')
if appname is None:
appname = pl['CFBundleDisplayName']
path = os.path.expanduser('~/Library/Caches/%s/python-eggs'%(appname,))
pkg_resources.set_extraction_path(path)
_setup_pkgresources()