simohe <sim...@besonet.ch> added the comment:

fix_imports rewrites the import statements to local or global. When a python 
module loads a local extension module, this import statement should be 
converted to a local import (from . import extensionmodule). But when the 
extension module is not built yet, fix_imports does not find them (no file 
named extenstionmodule.[so|sl]). So it suggests a global import (import 
extensionmodule).


The original comment is a slightly modified version of this here:
http://selenic.com/hg/file/afc02adf4ded/contrib/setup3k.py#l223


short summary:

build.sub_commands in distutils.command.build should list "build_ext" before 
"build_py".
lib2to3.fixes.fix_import will write global instead of local import statements 
else.

----------
assignee:  -> tarek
components: +Distutils -Build
nosy: +tarek

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13317>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to