Instruction how to compile binary libraries used by TextIndexNG2 on Windows with Python 2.4 to use in Zope 2.9 or later. Or you can just download them here.
ERROR TextIndexNG Import of Python extensions failed
This is the main reason. I was working on old Zope web application that was recently ported to Zope 2.10. Everything was fine on Linux machine but I couldn’t make it to work on my Windows development laptop. I’ve looked on TextIndexNG on Sourceforge but they only provide binaries (*.pyd files) for Python 2.3. During my search I’ve found interesting statement from Andreas Jung about support for Windows.
Ultimately I didn’t find libraries anywhere. The only choice for me was to compile them myself. Brr. But it was quite simple. If you want you can read this article and do it yourself. Or just download TextIndexNG2 Windows binaries for Python2.4 and use it.
I don’t know much about this. From my point of view it is a C compiler that works on Windows and has worked for me. You can download it from sourceforge.net and read more on mingw.org. If I’ve manged to install it you can do it too.
Install Python 2.4
I assume that you already have Zope installed and TextIndexNG2 in Products folder. It is also necessary to install Python 2.4. We need it to run setup and compilation. We can’t use Python from Zope release because it is not shipped with source files.
Run these commands
Remember to change paths to folders according to what and where you have installed.
- Run command line. Usually menu Start->Run
- Go to TextIndexNG product
- Add MinGW binaries to Windows PATH for this session.
- Run setup using standalone Python 2.4, not one from Zope
- Copy libraries from build\lib.win32-2.4 to your Zope’s site-packages. You should see those 4 files: indexsupport.pyd, Levenshtein.pyd, normalizer.pyd, TXNGSplitter.pyd.
But Where Do You Put the Binaries
Binaries to site-packages
I think point 5 describes in details where to put them.
First you need to unzip them of course. Then copy to: