Toshio Kuratomi added the comment:

Matthias, Barry, and I looked at this at pycon today.  It looks a bit like the 
original intent was to have
SO = ".so"
SOABI = "cpython-32mu"

and then CPython extension module suffixes would be:

if SOABI:
    so_ext = ''.join(".", SOABI, SO)
else:
    so_ext = SO

This would need to be used in distutils/commands/build_ext.py  We weren't sure 
if there are other places in the code that would need it as well but a quick 
build of a module which uses libraries and needs C extensions showed that this 
seems to work.

The one worrisome question is whether more people have come to rely on the SO 
variable holding the extension module suffix or if more code was broken by the 
extension module suffix replacing the library suffix in the SO variable.  
Answering that might better show us whether to change these variables back to 
their original meanings or to create brand new variables that have the correct 
values.

We also discovered the reason the current version appears to work with 
python-pillow on Ubuntu boxes but not Fedora.  The find_library_files() code 
first checks for library names that would match with the "shared" library 
suffix.  If that fails, it falls back to looking for the "static" library 
suffix.  On Fedora, there are no static libraries so this function just fails 
to find the library.  On Ubuntu, the code finds the static libraries and 
returns that.  This causes the code in python-pillow to attempt to link to the 
library with -ljpeg, -lpng, etc...  Since the shared libraries actually are 
present, the compiler and linker use the shared versions even though python 
only found the static versions.

----------
nosy: +a.badger

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

Reply via email to