[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze

Thomas Kluyver report at bugs.python.org
Wed Mar 12 20:46:05 CET 2014


Thomas Kluyver added the comment:

I think msg213138 has the key: importlib is actually getting frozen in the Python sense of the module's bytecode being included in a C file and then compiled, not just copied into a zip file. When we freeze importlib._bootstrap as _frozen_importlib, importlib is brought along for the ride as well. So when Python code imports it, it's loading from the frozen copy, and __file__ is not defined.

I think I can see how to fix this in cx_Freeze.

----------
nosy: +takluyver

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20884>
_______________________________________


More information about the Python-bugs-list mailing list