This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author simohe
Recipients eric.araujo, simohe, tarek
Date 2011-11-03.20:51:34
SpamBayes Score 5.8631713e-06
Marked as misclassified No
Message-id <1320353495.15.0.419965770813.issue13317@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-11-03 20:51:35simohesetrecipients: + simohe, tarek, eric.araujo
2011-11-03 20:51:35simohesetmessageid: <1320353495.15.0.419965770813.issue13317@psf.upfronthosting.co.za>
2011-11-03 20:51:34simohelinkissue13317 messages
2011-11-03 20:51:34simohecreate