Issue 5132: distutils: libpython not found when building python extensions on Solaris when Python was built with --enable-shared (original) (raw)
I've had trouble building Python extensions on Solaris if the Python install I'm using was built with the '--enable-shared' option. In tracking this down, it appears that the code in 'distutils/command/build_ext.py' contains a number of statements to detect a similar situation for other platforms and explicitly add the 'lib' dir option for the linker, but there is no similar detection for Solaris.
I've attached a patch that fixes this and solves the problem for me. I simply extended the checking for 'linux' and 'gnu' platforms to also apply for 'sunos' platforms.