[Python-Dev] How to fix the incorrect shared library extension on linux for 3.2 and newer?

Ronald Oussoren ronaldoussoren at mac.com
Wed Apr 10 17:30:23 CEST 2013

On 4 Apr, 2013, at 14:46, Julian Taylor <jtaylor.debian at googlemail.com> wrote:

> The values on macos for these variables still look wrong in 3.3.1rc1:
> ./configure --prefix=/Users/jtaylor/tmp/py3.3.1 --enable-shared
> on macosx-10.8-x86_64
> sys.version_info(major=3, minor=3, micro=1, releaselevel='candidate', serial=1)
> SO .so
> the only correct one here is EXT_SUFFIX, SHLIB_SUFFIX should be .dylib (libpython is a .dylib) and .SO possibly too given for what it was used in the past.

SO is explicitly defined as being the same as EXT_SUFFIX (in Makefile.pre.in for 3.3), and is gone in default. 

I'm not sure that SHLIB_SUFFIX is supposed to be because it isn't used other than to calculate the suffix to use for extensions and that shouldn't change on OSX for backward compatiblity reasons, and if it were changed I'd much rather see it changes to something like '.pyext' instead of '.dylib'. But that ship has long sailed, the very limited advantages of using a unique filename suffix for Python extensions isn't worth the very real breakage of actually changing it :-)

Oh, and at least setup.py assumes that sysconfig.get_config_var('EXT_SUFFIX').endswith(sysconfig.get_config_var('SHLIB_SUFFIX')).

BTW. This is a problem for a lot of the information you can retrieve with sysconfig.get_config_var(), a large subset of the information is only useful during the build/installation of Python itself and as none of them are actually documented using sysconfig.get_config_var() is somewhat of a black art.

> 3.3.0 also returns wrong values
> SO .so

Could you file an issue on the tracker about this? 


> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ronaldoussoren%40mac.com

More information about the Python-Dev mailing list