id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 8062,Trac can't be installed as zip-safe egg,Christian Boos,Christian Boos,"This comes as a follow-up to #7877, which was about a problem in the TracMercurial plugin, where the line: {{{ pkg_resources.resource_filename(__name__, '../locale') }}} would fail when the plugin was installed as an egg. Now Trac itself has the same construction in trac/util/text.py, and it seems to have exactly the same issue: - when Trac egg is flagged zip-unsafe, it gets extracted in site-packages when `easy_install`ed, then the `pkg_resources.resource_filename(__name__, '../locale')` call works fine - when Trac egg is as zip-safe, easy_install simply copies the egg in site-packages , and then Trac fails with a !KeyError: {{{ Traceback (most recent call last): File ""build\bdist.win32\egg\trac\web\api.py"", line 372, in send_error translation.activate(self.locale, env.path) File ""build\bdist.win32\egg\trac\util\translation.py"", line 250, in activate translations.activate(locale, env_path) File ""build\bdist.win32\egg\trac\util\translation.py"", line 114, in activate locale_dir = pkg_resources.resource_filename(__name__, '../locale') File ""C:\Workspace\src\trac\dependencies\setuptools\pkg_resources.py"", line 841, in resource_filename self, resource_name File ""C:\Workspace\src\trac\dependencies\setuptools\pkg_resources.py"", line 1311, in get_resource_filename return self._extract_resource(manager, zip_path) File ""C:\Workspace\src\trac\dependencies\setuptools\pkg_resources.py"", line 1322, in _extract_resource zip_stat = self.zipinfo[zip_path] KeyError: 'trac\\util\\..\\locale' }}}",defect,closed,normal,0.12,general,0.12dev,normal,fixed,setuptools egg i18n,,,,,