[pylucene-dev] Re: building JCC on Windows with MinGW
Bill Janssen
janssen at parc.com
Thu Mar 20 12:58:35 PDT 2008
> > Apparently not. Passing --ccompiler=mingw32 to setup.py seems to do
> > the trick. Another distutils 'gotcha'.
Actually, the flag is "--compiler", not "--ccompiler".
> Unless JCC knows to use that flag when it invokes distutils/setuptools, this
> trick is only going to work when building JCC itself. I guess, I could add
> yet another command line arg to JCC to pass this through, though.
Well, something's sticky. I just compiled JCC with it,
python setup.py build --compiler=mingw32
then installed JCC
python setup.py install
then cd .. up to Lucene proper, and add yet another section to the Makefile:
# Windows (Win32, MinG+MSYS, Python 2.4.3, Java 1.6, ant 1.7.0)
PREFIX_PYTHON=c:/Python24
ANT=JAVA_HOME="/c/Program Files/Java/jdk1.6.0_04" "/c/Program Files/apache-ant-1.7.0/bin/ant"
PYTHON=$(PREFIX_PYTHON)/python.exe
JCC=$(PYTHON) $(PREFIX_PYTHON)/Lib/site-packages/JCC-1.8-py2.4-win32.egg/jcc/__init__.py
NUM_FILES=1
and do "make". It compiles and links PyLucene correctly, using MinGW
executables and flags.
It appears to inherit the appropriate MinGW stuff from JCC.
Bill
More information about the pylucene-dev
mailing list