On Mar 24, 2008, at 11:28, Bill Janssen <[EMAIL PROTECTED]> wrote:
Also if you don't mind to explain, what is this shared option, I
couldn't find it (easily) on google? What's the difference with
normal
python extension?
This new --shared option is used by JCC to compile a Python
extension (such
as PyLucene) so that it can be used along with other JCC-compiled
extensions
in the same process. This requires that a portion of JCC itself be
compiled
as a shared library (a DLL on Windows) as opposed to a just Python
extension. Historically, distutils/setuptools has not been capable of
building such regular shared libraries and use them. The newest
setuptools
(>= 0.6c7) can do this now on some platforms as Bill and I are slowly
discovering (with caveats).
I'm wondering: do we really need two shared libraries for JCC? The
jcc.pyd file (or libjcc.so on Unix) is a bona fide shared library
already. Why are we generating jcc.dll as well? Is this a packaging
play? Is the intention that we can build PyLucene --shared, then
distribute just it and the jcc.dll file, without needing to distribute
the whole jcc module? If so, how much are we buying with this?
On Linux, you could get away with linking against _jcc.so. On Windows,
you'd have to bend distutils to link against the .lib produced from
_jcc.pyd (and build with -D_shared to get the symbols exported and
imported and get the OS to look for _jcc.pyd instead of _jcc.dll) and
on Mac you'd hit the issue that the Python extension is not a shared
lib but a bundle that you can't link against. For consistency's sake,
I'd like the extensions and shared libs to be the same everywhere and
let distutils/setuptools deal with the mess.
It seems to work quite nicely now provided you have a recent
setuptools (>= 0.6c7). On the other hand, without setuptools (or an
older one) you're stuck with creating the shared lib by hand.
For simplicity's sake, until modern setuptools is widespread, I'd like
to keep the static case simplest and the default.
Andi..
Bill
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev