[Distutils] [issue43] add force_shared Library option to create shared lib even with use_stubs=False

vajda setuptools at bugs.python.org
Thu Sep 11 07:43:18 CEST 2008

New submission from vajda <vajda at osafoundation.org>:

setuptools is growing the capability to build regular shared libraries
(as opposed to python extensions). JCC
(http://svn.osafoundation.org/pylucene/trunk/jcc/jcc) uses this
capability to build the JCC runtime into a regular shared library shared
by all python extensions it builds and by programs embedding python
(such as a Java VM when running JCC-built eggs from Apache Tomcat).

This bug is about adding another option to the setuptools Library class
called force_shared which forces setuptools to create a shared library
from a Library instance even though the dl module may not be present to
generate stubs. This is important on Linux. Note that using this flag
then implies that the library itself is responsible for calling        
dlopen(buf, RTLD_NOW | RTLD_GLOBAL) on the relevant libpython.so before
initializing the python runtime is initialized.

A patch against the setuptools 0.6 branch svn is attached.
The idea for this patch came from a conversation on IRC:

assignedto: pje
files: patch.st
messages: 162
nosy: pje, vajda
priority: feature
status: unread
title: add force_shared Library option to create shared lib even with use_stubs=False
Added file: http://bugs.python.org/setuptools/file22/patch.st

Setuptools tracker <setuptools at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.st
Type: application/octet-stream
Size: 5934 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080911/2bf805d0/attachment-0001.obj>

More information about the Distutils-SIG mailing list