[Python-Dev] module extension search order - can it be changed?
Skip Montanaro
skip@pobox.com
Tue, 25 Feb 2003 10:02:50 -0600
>> This doesn't quite make sense to me. Instead of ".so cannot be
>> built" did you mean ".so cannot be imported"?
Guido> No, I meant what I said. Once the file is found, it will be
Guido> tried and if that fails, the other files won't be tried. The
Guido> idea was that if the .so cannot be built, it won't be installed
Guido> -- but the .py will be there at all times.
In which case there is no .so file to try to find, thus no "feature".
>> In any case, the current solution to my underlying problem (so many
>> failing stat() calls during module import) appears to be to create
>> $prefix/python23.zip and populate it with the contents of the
>> standard library using zipfile.PyZipFile.
Guido> Right, that's what zipimport is for.
Any thought about having the installation process create and populate
python23.zip? It's not particularly hard. I'm willing to submit a patch
for the build/install process.
Skip