module name differences depending on how generated
Richard Barrett
R.Barrett at ftel.co.uk
Mon Jun 10 12:45:30 EDT 2002
Compiling Python 2.2.1 from source on Suse Linux 7.3.
It appears that if the nis (Sun Yellow Pages support) module is generated
by $build/setup.py, the resulting shared library is called nis.so
(presumably per the Extension constructor in $build/setup.py).
If, on the other hand, you enable the nis support module's production in
the $build/Modules/Setup file the module gets called nismodule.so (after
the source file name).
I'll assume there is a good reason for this difference and would appreciate
it if anyone could tell me what it is.
It happens that I initially did make install (which installed nis.so).
Later, while making other changes, I uncommented the nismodule line
$build/Modules/Setup and ended up with both nis and nismodule installed. As
I subsequently figured out, nis.so will be loaded in preference to
nismodule.so when in response to an import nis statement.
The problem I then had was that in patching nismodule.c to fix a documented
problem in the nismdoule.c code running under Linux (see
http://sourceforge.net/tracker/index.php?func=detail&aid=233084&group_id=5470&atid=105470)
running make install to generate a revised nis support module produced and
installed a new nismodule.so. But this had no effect as the originally
generated nis.so was being picked up in preference. Of course nis.so was
not being regenerated and installed (presumably because setup.py detected
that nismodule.so was being produced) so that at first blush the patch
appeared to be ineffective.
Having wasted some time with this module naming problem, I thought I'd ask
if it was for a good purpose.
More information about the Python-list
mailing list