On Thu, 20 Mar 2008, Bill Janssen wrote:

Unless python itself was compiled with mingw I don't see how this is
possible from JCC alone.

Andi..

Hmmm.  I wonder.  I think it's the stock Python 2.4.3, but I can
re-install and try again.  I figured JCC was caching this information
somewhere, and re-using it.

By the way, enabling shared JCC on Windows seems to work for building
JCC, but I haven't figured out the right flags to pass to a
JCC-wrapped module build yet.  I somehow have to tell g++ that, when
looking for DLLs to link against, the "pyd" extension marks a DLL.

Enabling 'shared' on Windows means that you figured out a way to make a Library (as instantiated in setup.py) build there with setuptools. I didn't verify that this was implemented on Windows. Maybe it works. It requires setuptools 0.6c7 at least (for instance, on Linux, 0.6c6 produces a .a file instead of a .so, so no good).

The .pyd extension is a Python-specific extension meaning "python extension module DLL". A .pyd is a regular DLL but a regular DLL is not a .pyd. libjcc.dylib should be called jcc.dll on Windows and I'd expect the Library instance in setup.py to take care of doing this, were it to work on Windows.

Normally, if I remember correctly, you have to link against the corresponding jcc.lib (which can be produced from jcc.dll) to get your executable to pull in jcc.dll at runtime (and have it findable by the OS). I've also seen before that one can link against a .dll directly but this is where I don't even claim to remember correctly. Of course, this is with MSVC, it may be quite different with MinGW.

I'm pretty sure that, on Windows, setuptools is going to be looking for jcc.lib if 'jcc' is specified in the 'libraries' args to setup() in JCC's python.py as is done currently if --shared is on.

By the way, --shared is enabled for all platforms, it's just the building of
the jcc shared library that is not enabled in setup.py except on Linux or Mac and then only with setuptools 0.6c7 or above. You can still manually build the jcc.dll shared lib, put it into the JCC egg (possibly along with it's jcc.lib import library) and use --shared with jcc on Windows.

Andi..
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to