Commit 5a50fc1e authored by PJ Eby's avatar PJ Eby

Fix bootstrap loader so extracted files don't have to be on sys.path.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4040993
parent 79a74b06
...@@ -74,11 +74,11 @@ class bdist_egg(Command): ...@@ -74,11 +74,11 @@ class bdist_egg(Command):
f.write('\n'.join([ f.write('\n'.join([
"def __bootstrap__():", "def __bootstrap__():",
" global __bootstrap__, __loader__, __file__", " global __bootstrap__, __loader__, __file__",
" import sys, pkg_resources", " import sys, pkg_resources, imp",
" __file__ = pkg_resources.resource_filename(__name__,%r)" " __file__ = pkg_resources.resource_filename(__name__,%r)"
% resource, % resource,
" del __bootstrap__, __loader__", " del __bootstrap__, __loader__",
" reload(sys.modules[__name__])", " imp.load_dynamic(__name__,__file__)",
"__bootstrap__()", "__bootstrap__()",
"" # terminal \n "" # terminal \n
])) ]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment