[issue20884] importlib/__init__.py can not be loaded without __file__ - breaks cxFreeze
Jurko Gospodnetić
report at bugs.python.org
Wed Mar 12 15:46:25 CET 2014
Jurko Gospodnetić added the comment:
That 'what's new' item seems relevant, except that the issue here
is related to the __file__ attribute instead of __path__. Could it
be that the same fix actually updated how the __file__ attribute is
defined as well?
The bug seems to be caused by importlib\__init__.py expecting its
__file__ attribute to be defined, thus not allowing it to be frozen
at all. :-(
Based on my rather slim understanding of how module 'freezing'
works I guess executables wanting to freeze the
importlib\__init__.py module can work around the problem by adding
code to the front of that module to hardcode its __file__ attribute
value, before freezing it. However I'd be happier with Python not
requiring that the __file__attribute be defined internally at all.
Imposing a workaround such as this on anyone wanting to freeze the
importlib package seems rather nasty.
Best regards,
Jurko Gospodnetić
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20884>
_______________________________________
More information about the Python-bugs-list
mailing list