Is setup.py a "good thing"? (long)

Gerd Woetzel woetzel at gmd.de
Mon Mar 26 12:19:26 CEST 2001


>Andrew Kuchling <akuchlin at mems-exchange.org> writes:

>> woetzel at gmd.de (Gerd Woetzel) writes:
>> > Modules/Setup has buit zlibmodule.so and socketmodule.so which worked
>> > fine during the test phase, but setup.py has (secretly?) created
>> > zlib.so (socket.so) too! Finally "make install" has installed all of them.
>>
>> That certainly shouldn't have happened.  Can you reproduce the problem?

Martin von Loewis <loewis at informatik.hu-berlin.de> writes:

>It could happen if you use *shared* in Modules/Setup and if setup.py
>is older than 1.30; before, it would use on builtin_module_names to
>exclude modules. So that was a problem once and should be fixed since
>2.1b1.

I have tried 2.1b1 and the newest 2.1b2a this morning.
It still installs both both _socket.so (wrong!) and _socketmodule.so (the
working module). Same with zlib.so and zlibmodule.so.

Note: After removing the installation directory /opt/python/lib/python2.1/
      I have done the Installation from scratch, starting with the extraction
      of Python-2.1b2a.tar.gz.

Here is my Setup.local which I have copied to Python-2.1b2a/Modules after
extraction of the sources (yes, I used  *shared*) :

   readline readline.c -I/opt/gnu/include -L/opt/gnu/lib -lreadline -ltermcap

   *shared*

   WZLIB=/home/woetzel/lib
   WZINCL=/home/woetzel/include
   _socket socketmodule.c \
	-DUSE_SSL -I$(WZINCL)/ssl -I$(WZINCL)/ssl/openssl \
	-L$(WZLIB)/ssl -R$(WZLIB)/ssl -lssl -lcrypto

   zlib zlibmodule.c -I$(WZINCL) -L$(WZLIB) -R$(WZLIB) -lz

Here is the output of "grep _socket make.out":

    Python-2.1b2a/Lib/test/output/test_socket
    Python-2.1b2a/Lib/test/test_socket.py
    Python-2.1b2a/PCbuild/_socket.dsp
    gcc -shared  Modules/socketmodule.o  -L/home/woetzel/lib/ssl -R/home/woetzel/lib/ssl -lssl -lcrypto  -o Modules/_socketmodule.so
    building '_socket' extension
    gcc -shared build/temp.solaris-2.8-sun4u-2.1/socketmodule.o -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.solaris-2.8-sun4u-2.1/_socket.so
    skipping '_socket' extension (up-to-date)
      from _socket import *
    test_socket
      from _socket import *
    test_socket
    /opt/gnu/gnubin/install -c -m 644 ./Lib/test/test_socket.py /opt/python/lib/python2.1/test
    /opt/gnu/gnubin/install -c -m 644 ./Lib/test/output/test_socket /opt/python/lib/python2.1/test/output
    Compiling /opt/python/lib/python2.1/test/test_socket.py ...
    Compiling /opt/python/lib/python2.1/test/test_socket.py ...
    skipping '_socket' extension (up-to-date)
    skipping '_socket' extension (up-to-date)
    copying build/lib.solaris-2.8-sun4u-2.1/_socket.so -> /opt/python/lib/python2.1/lib-dynload
    /opt/gnu/gnubin/install -c -m 555 Modules/_socketmodule.so /opt/python/lib/python2.1/lib-dynload/_socketmodule.so


ls -l /opt/python/lib/python2.1/lib-dynload/_socket*:

    -rwxrwxr-x  1 woetzel  woetzel     60704 Mar 26 11:24 /opt/python/lib/python2.1/lib-dynload/_socket.so
    -r-xr-xr-x  1 woetzel  woetzel     60668 Mar 26 11:35 /opt/python/lib/python2.1/lib-dynload/_socketmodule.so

Not a big Problem. "rm lib-dynload/_socket.so" will fix it.
Just for information ... 

Regards,
Gerd
--
Gerd Woetzel            | email: gerd.woetzel at gmd.de
GMD FIT.CSCW            | phone: ++49 2241 142648 (fax: 142084)
D-53754 Sankt Augustin  | www:   http://orgwis.gmd.de/~woetzel/



More information about the Python-list mailing list