|
Thomas Koch
2010-03-09, 12:13
Andi Vajda
2010-03-09, 14:50
Roman Chyla
2010-03-09, 19:18
Andi Vajda
2010-03-10, 16:17
Jeremy Michels
2012-04-28, 18:14
Bill Janssen
2012-04-28, 20:35
Andi Vajda
2012-04-28, 22:15
Bill Janssen
2012-04-29, 01:25
|
-
Building PyLucene on WindowsThomas Koch 2010-03-09, 12:13
Dear PyLucene-fans,
I just managed to build pylucene-2.9.1-1 on Windows with Python 2.6 and Java 1.6 and like to tell my 'story' - just in case anyone else runs into similar problems... First I should mention that I'm using PyLucene for quite a while now - just never needed to build it on windows - there used to be binary distributions on the net (here: http://code.google.com/p/pylucene-win32-binary/ - however it's out-of-date). Also I am a bit familiar with Makefiles, Ant and other toolchains... Next it should be said that not only PyLucene is great piece of software but also Documentation (and samples / test-suite) is very well maintained. The only thing that's missing from my point of view is clear advise on requirements for building PyLucene on specific platforms. Maybe that's also the cause of the trouble I had in building it ... I knew I need a C++ compiler, ANT, Java and Python. Also as Makefile is used some kind of make-utitilty would be needed. So here's the setup I've choosen: - Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) - Java 1.6 (jdk1.6.0_06) - compiler: MS-Visual-Studio9 (Microsoft Visual C++ 2008 Express Edition) - mingw32-make from MinGW-5.1.6 - see http://www.mingw.org/ (GNU Make 3.81 built for i386-pc-mingw32) - ANT 1.8.0 - pylucene-2.9.1-1 / lucene-java-2.9.1 - Windows7 The building of JCC was no problem. The first issues came up when entering the make-toolchain: apparently there are some differences on Windows that either my windows binary GNU make couldn't handle very well or need to be fixed for windows anyway... This especially holds for path separators and command separators. For example I had to change $(LUCENE_JAR): $(LUCENE) cd $(LUCENE) ; $(ANT) -Dversion=$(LUCENE_VER) to $(LUCENE_JAR): $(LUCENE) cd $(LUCENE) && $(ANT) -Dversion=$(LUCENE_VER) (took me a while to figure this out ,-) PYLUCENE:=$(shell pwd) to PYLUCENE:=$(shell cd) BUILD_TEST:=$(PYLUCENE)/build/test to BUILD_TEST:=$(PYLUCENE)\build\test (note: cd may work with "/" but when it comes to mkdir this fails - e.h. mingw32-make test mkdir -p pylucene-2.9.1-1/build/test Syntaxfehler. mingw32-make: *** [install-test] Error 1 ) Finally herer are my Makefile settings: # Windows (Win32, Python 2.6, Java 1.6, ant 1.8) SHELL=cmd.exe PYLUCENE:=$(shell cd) ANT=F:\devel\apache-ant-1.8.0\bin\ant JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_06 PREFIX_PYTHON=C:\\Python26 PYTHON=$(PREFIX_PYTHON)\python.exe JCC=$(PYTHON) -m jcc.__main__ NUM_FILES=3 So either I've choosen the wrong tools or there should be others with similar problems. If my toolchain is wrong or unsupported please advise. Is it recommended/required to use Cygwin on Windows? If anyone is interested I can offer to - post my adapted Makefile here (or on the web) - provide binary version of PyLucene (on the web) Finally some suggestion: wouldn't it be possible to skip the Makefile completely? I'm not that familiar with ANT but know it has been developed to provide platform independant built processes - and it includes shell-tasks for anything that is not java... (I know this could be some work, just wanted to know if this question has been raised before or if this is a no-go option ?) best regards Thomas Koch -- OrbiTeam Software GmbH & Co. KG Endenicher Allee 35 53121 Bonn Germany [EMAIL PROTECTED] http://www.orbiteam.de
-
Re: Building PyLucene on WindowsAndi Vajda 2010-03-09, 14:50
On Mar 9, 2010, at 13:13, "Thomas Koch" <[EMAIL PROTECTED]> wrote: > Dear PyLucene-fans, > > I just managed to build pylucene-2.9.1-1 on Windows with Python 2.6 > and Java > 1.6 and like to tell my 'story' - just in case anyone else runs into > similar > problems... > > First I should mention that I'm using PyLucene for quite a while now > - just > never needed to build it on windows - there used to be binary > distributions > on the net (here: http://code.google.com/p/pylucene-win32-binary/ - > however > it's out-of-date). Also I am a bit familiar with Makefiles, Ant and > other > toolchains... > > Next it should be said that not only PyLucene is great piece of > software but > also Documentation (and samples / test-suite) is very well maintained. > > The only thing that's missing from my point of view is clear advise on > requirements for building PyLucene on specific platforms. Maybe > that's also > the cause of the trouble I had in building it ... I knew I need a C++ > compiler, ANT, Java and Python. Also as Makefile is used some kind of > make-utitilty would be needed. So here's the setup I've choosen: > > - Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) > - Java 1.6 (jdk1.6.0_06) > - compiler: MS-Visual-Studio9 (Microsoft Visual C++ 2008 Express > Edition) > - mingw32-make from MinGW-5.1.6 - see http://www.mingw.org/ > (GNU Make 3.81 built for i386-pc-mingw32) > - ANT 1.8.0 > - pylucene-2.9.1-1 / lucene-java-2.9.1 > - Windows7 > > The building of JCC was no problem. The first issues came up when > entering > the make-toolchain: apparently there are some differences on Windows > that > either my windows binary GNU make couldn't handle very well or need > to be > fixed for windows anyway... > > This especially holds for path separators and command separators. For > example I had to change > > > $(LUCENE_JAR): $(LUCENE) > cd $(LUCENE) ; $(ANT) -Dversion=$(LUCENE_VER) > to > $(LUCENE_JAR): $(LUCENE) > cd $(LUCENE) && $(ANT) -Dversion=$(LUCENE_VER) > > (took me a while to figure this out ,-) > > PYLUCENE:=$(shell pwd) > to > PYLUCENE:=$(shell cd) > > BUILD_TEST:=$(PYLUCENE)/build/test > to > BUILD_TEST:=$(PYLUCENE)\build\test > > (note: cd may work with "/" but when it comes to mkdir this fails - > e.h. > mingw32-make test > mkdir -p pylucene-2.9.1-1/build/test > Syntaxfehler. > mingw32-make: *** [install-test] Error 1 > ) > > > Finally herer are my Makefile settings: > > # Windows (Win32, Python 2.6, Java 1.6, ant 1.8) > SHELL=cmd.exe > PYLUCENE:=$(shell cd) > ANT=F:\devel\apache-ant-1.8.0\bin\ant > JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_06 > PREFIX_PYTHON=C:\\Python26 > PYTHON=$(PREFIX_PYTHON)\python.exe > JCC=$(PYTHON) -m jcc.__main__ > NUM_FILES=3 > > > So either I've choosen the wrong tools or there should be others with > similar problems. If my toolchain is wrong or unsupported please > advise. Is > it recommended/required to use Cygwin on Windows? Yes, cygwin is required so that you have a functional gnu make. Note that you still need to use a MS compiler or mingw, which some people have been able to use. I test build pylucene every now and then on an old win2k system with cygwin (for make and shell) and msvc 7.1. Not a setup with the most recent software but that's all I've got for windows. Andi.. > > If anyone is interested I can offer to > - post my adapted Makefile here (or on the web) > - provide binary version of PyLucene (on the web) > > Finally some suggestion: wouldn't it be possible to skip the Makefile > completely? I'm not that familiar with ANT but know it has been > developed to > provide platform independant built processes - and it includes shell- > tasks > for anything that is not java... (I know this could be some work, just > wanted to know if this question has been raised before or if this is > a no-go > option ?) > > best regards > > Thomas Koch > -- > OrbiTeam Software GmbH & Co. KG > Endenicher Allee 35 > 53121 Bonn Germany > [EMAIL PROTECTED]
-
Re: Building PyLucene on WindowsRoman Chyla 2010-03-09, 19:18
Hi,
I would also like to thank to Andi (and others?) for the great tool and the samples, it is really excellent. I am using MSVC7.1 on win xp, it builds fine, but it was quite difficult at the beginning (especially, because I tried with mingw before falling back to msvc). And indeed, is gnu make indispensable? In some previous posts it was said that Ant is not an option (makes Python programmers scream and run away) and 'make' is there because nobody provided something else. This naturally brings us to the practical problem: it can be done, but somebody has to DO IT, right? ;-) What would you think about scons? http://www.scons.org/ roman On Tue, Mar 9, 2010 at 3:50 PM, Andi Vajda <[EMAIL PROTECTED]> wrote: > > On Mar 9, 2010, at 13:13, "Thomas Koch" <[EMAIL PROTECTED]> wrote: > >> Dear PyLucene-fans, >> >> I just managed to build pylucene-2.9.1-1 on Windows with Python 2.6 and >> Java >> 1.6 and like to tell my 'story' - just in case anyone else runs into >> similar >> problems... >> >> First I should mention that I'm using PyLucene for quite a while now - >> just >> never needed to build it on windows - there used to be binary >> distributions >> on the net (here: http://code.google.com/p/pylucene-win32-binary/ - >> however >> it's out-of-date). Also I am a bit familiar with Makefiles, Ant and other >> toolchains... >> >> Next it should be said that not only PyLucene is great piece of software >> but >> also Documentation (and samples / test-suite) is very well maintained. >> >> The only thing that's missing from my point of view is clear advise on >> requirements for building PyLucene on specific platforms. Maybe that's >> also >> the cause of the trouble I had in building it ... I knew I need a C++ >> compiler, ANT, Java and Python. Also as Makefile is used some kind of >> make-utitilty would be needed. So here's the setup I've choosen: >> >> - Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) >> - Java 1.6 (jdk1.6.0_06) >> - compiler: MS-Visual-Studio9 (Microsoft Visual C++ 2008 Express Edition) >> - mingw32-make from MinGW-5.1.6 - see http://www.mingw.org/ >> (GNU Make 3.81 built for i386-pc-mingw32) >> - ANT 1.8.0 >> - pylucene-2.9.1-1 / lucene-java-2.9.1 >> - Windows7 >> >> The building of JCC was no problem. The first issues came up when entering >> the make-toolchain: apparently there are some differences on Windows that >> either my windows binary GNU make couldn't handle very well or need to be >> fixed for windows anyway... >> >> This especially holds for path separators and command separators. For >> example I had to change >> >> >> $(LUCENE_JAR): $(LUCENE) >> cd $(LUCENE) ; $(ANT) -Dversion=$(LUCENE_VER) >> to >> $(LUCENE_JAR): $(LUCENE) >> cd $(LUCENE) && $(ANT) -Dversion=$(LUCENE_VER) >> >> (took me a while to figure this out ,-) >> >> PYLUCENE:=$(shell pwd) >> to >> PYLUCENE:=$(shell cd) >> >> BUILD_TEST:=$(PYLUCENE)/build/test >> to >> BUILD_TEST:=$(PYLUCENE)\build\test >> >> (note: cd may work with "/" but when it comes to mkdir this fails - e.h. >> mingw32-make test >> mkdir -p pylucene-2.9.1-1/build/test >> Syntaxfehler. >> mingw32-make: *** [install-test] Error 1 >> ) >> >> >> Finally herer are my Makefile settings: >> >> # Windows (Win32, Python 2.6, Java 1.6, ant 1.8) >> SHELL=cmd.exe >> PYLUCENE:=$(shell cd) >> ANT=F:\devel\apache-ant-1.8.0\bin\ant >> JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_06 >> PREFIX_PYTHON=C:\\Python26 >> PYTHON=$(PREFIX_PYTHON)\python.exe >> JCC=$(PYTHON) -m jcc.__main__ >> NUM_FILES=3 >> >> >> So either I've choosen the wrong tools or there should be others with >> similar problems. If my toolchain is wrong or unsupported please advise. >> Is >> it recommended/required to use Cygwin on Windows? > > Yes, cygwin is required so that you have a functional gnu make. > Note that you still need to use a MS compiler or mingw, which some people > have been able to use. > > I test build pylucene every now and then on an old win2k system with cygwin > (for make and shell) and msvc 7.1. Not a setup with the most recent software
-
Re: Building PyLucene on WindowsAndi Vajda 2010-03-10, 16:17
On Mar 9, 2010, at 20:18, Roman Chyla <[EMAIL PROTECTED]> wrote: > Hi, > > I would also like to thank to Andi (and others?) for the great tool > and the samples, it is really excellent. I am using MSVC7.1 on win xp, > it builds fine, but it was quite difficult at the beginning > (especially, because I tried with mingw before falling back to msvc). > > And indeed, is gnu make indispensable? Yes, unless someone writes something else for windows. > In some previous posts it was > said that Ant is not an option (makes Python programmers scream and > run away) and 'make' is there because nobody provided something else. Right. > This naturally brings us to the practical problem: it can be done, but > somebody has to DO IT, right? ;-) Exactly. > What would you think about scons? > http://www.scons.org/ I'm not near my computer this week so I can't take a look at this now but, in principle, if a windows user came forward with a better build solution for windows (or better yet, in general) and is prepared to maintain it, that would be a big plus. Andi.. > > > roman > > On Tue, Mar 9, 2010 at 3:50 PM, Andi Vajda <[EMAIL PROTECTED]> wrote: >> >> On Mar 9, 2010, at 13:13, "Thomas Koch" <[EMAIL PROTECTED]> wrote: >> >>> Dear PyLucene-fans, >>> >>> I just managed to build pylucene-2.9.1-1 on Windows with Python >>> 2.6 and >>> Java >>> 1.6 and like to tell my 'story' - just in case anyone else runs into >>> similar >>> problems... >>> >>> First I should mention that I'm using PyLucene for quite a while >>> now - >>> just >>> never needed to build it on windows - there used to be binary >>> distributions >>> on the net (here: http://code.google.com/p/pylucene-win32-binary/ - >>> however >>> it's out-of-date). Also I am a bit familiar with Makefiles, Ant >>> and other >>> toolchains... >>> >>> Next it should be said that not only PyLucene is great piece of >>> software >>> but >>> also Documentation (and samples / test-suite) is very well >>> maintained. >>> >>> The only thing that's missing from my point of view is clear >>> advise on >>> requirements for building PyLucene on specific platforms. Maybe >>> that's >>> also >>> the cause of the trouble I had in building it ... I knew I need a C >>> ++ >>> compiler, ANT, Java and Python. Also as Makefile is used some kind >>> of >>> make-utitilty would be needed. So here's the setup I've choosen: >>> >>> - Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) >>> - Java 1.6 (jdk1.6.0_06) >>> - compiler: MS-Visual-Studio9 (Microsoft Visual C++ 2008 Express >>> Edition) >>> - mingw32-make from MinGW-5.1.6 - see http://www.mingw.org/ >>> (GNU Make 3.81 built for i386-pc-mingw32) >>> - ANT 1.8.0 >>> - pylucene-2.9.1-1 / lucene-java-2.9.1 >>> - Windows7 >>> >>> The building of JCC was no problem. The first issues came up when >>> entering >>> the make-toolchain: apparently there are some differences on >>> Windows that >>> either my windows binary GNU make couldn't handle very well or >>> need to be >>> fixed for windows anyway... >>> >>> This especially holds for path separators and command separators. >>> For >>> example I had to change >>> >>> >>> $(LUCENE_JAR): $(LUCENE) >>> cd $(LUCENE) ; $(ANT) -Dversion=$(LUCENE_VER) >>> to >>> $(LUCENE_JAR): $(LUCENE) >>> cd $(LUCENE) && $(ANT) -Dversion=$(LUCENE_VER) >>> >>> (took me a while to figure this out ,-) >>> >>> PYLUCENE:=$(shell pwd) >>> to >>> PYLUCENE:=$(shell cd) >>> >>> BUILD_TEST:=$(PYLUCENE)/build/test >>> to >>> BUILD_TEST:=$(PYLUCENE)\build\test >>> >>> (note: cd may work with "/" but when it comes to mkdir this fails >>> - e.h. >>> mingw32-make test >>> mkdir -p pylucene-2.9.1-1/build/test >>> Syntaxfehler. >>> mingw32-make: *** [install-test] Error 1 >>> ) >>> >>> >>> Finally herer are my Makefile settings: >>> >>> # Windows (Win32, Python 2.6, Java 1.6, ant 1.8) >>> SHELL=cmd.exe >>> PYLUCENE:=$(shell cd) >>> ANT=F:\devel\apache-ant-1.8.0\bin\ant >>> JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_06
-
Building PyLucene on WindowsJeremy Michels 2012-04-28, 18:14
Would you be willing to share your makefile? I am having quite a bit of
trouble with this as well.
-
Re: Building PyLucene on WindowsBill Janssen 2012-04-28, 20:35
Jeremy Michels <[EMAIL PROTECTED]> wrote:
> Would you be willing to share your makefile? I am having quite a bit > of trouble with this as well. I build PyLucene on Windows regularly. I use mingw to compile and link. My build script is at http://uplib.parc.com/hg/uplib/file/2013b08512fa/win32/build-windows-prereqs.sh; look for "-- jcc --". Note that you must have an appropriately patched setuptools installed, first. Rather than editing the Makefile for PyLucene, I just override the appropriate make variables in the build environment. Bill
-
Re: Building PyLucene on WindowsAndi Vajda 2012-04-28, 22:15
On Apr 28, 2012, at 16:35, Bill Janssen <[EMAIL PROTECTED]> wrote: > Jeremy Michels <[EMAIL PROTECTED]> wrote: > >> Would you be willing to share your makefile? I am having quite a bit >> of trouble with this as well. > > I build PyLucene on Windows regularly. I use mingw to compile and link. > My build script is at > http://uplib.parc.com/hg/uplib/file/2013b08512fa/win32/build-windows-prereqs.sh; > look for "-- jcc --". Note that you must have an appropriately patched > setuptools installed, first. The patch to setuptools is for Linux only unless I'm mistaken. Andi.. > > Rather than editing the Makefile for PyLucene, I just override the > appropriate make variables in the build environment. > > Bill
-
Re: Building PyLucene on WindowsBill Janssen 2012-04-29, 01:25
Andi Vajda <[EMAIL PROTECTED]> wrote:
> The patch to setuptools is for Linux only unless I'm mistaken. Yes, you'll see if you look at that script that I don't apply any patches to setuptools before I install it. I do have to apply a patch to jcc's setup.py to generate the appropriate .lib file, though. http://uplib.parc.com/hg/uplib/file/2013b08512fa/patches/jcc-2.9-mingw-PATCH Not sure if that's still necessary. Bill |