You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Jacob Floyd <te...@gmail.com> on 2009/02/18 04:06:19 UTC

Replacing the Makefile

Have you considered replacing the Makefile with a pure build.xml
replacement? As the gentoo ebuild was not as readable as the gentoo
devs would have liked, they had me write it so that I could use
pyAntTasks ( http://www.rpstechnologies.net/PyAntTasks.html
http://code.google.com/p/pyanttasks/ ) to take care of running the
python script. If you'd like I can send a copy to the list, or check
out the build.xml here (for 30 days of course):
http://dpaste.com/121964/ The only things I didn't include were the
test, distrib, and this doesn't download or compile lucene. It assumes
that the lucene jars are in the same directory as build.xml (which is
done from the ebuild). I use the following options on the commandline
when running ant to use this which sets several variables to gentoo
specific variables.

ant install (or build) -f "build.xml" \
-Dpython=${python} -Dversion=${MY_PV} -Dlucene.pv=${LUCENE_PV} \
-Dpython.modname=${PYTHON_MODNAME} -Dpython.sitedir=$(python_get_sitedir) \
-Dgentoo.numfiles=2 -Dgentoo.debug=${DEBUG_OPT} -Dgentoo.root=${D} \
-Dgentoo.work=${S}

Perhaps this can be reused. I hope so. What do you all think of
replacing the Makefile like this using ant?

-Jacob Floyd

Re: Replacing the Makefile

Posted by Jacob Floyd <te...@gmail.com>.
Well, to tell the truth the limit of my exposure to setup.py is with
pylucene and related chandler dependencies. Though I don't know
exactly when I'd be able to do something like that, any suggestions
(besides googleing it, of course) of where to learn about making the
setup.py, or even about writing python? Are there any known cases
where someone has already made the java jars from a setup.py or
equivalent python script? As it is now, the python folks at gentoo
refused to do much with the ebuild because of compiling the one
extensions.jar, so all the help I got was from the java people - thus
the solution they know and like so well: ant. I'm inpartial either way
- I just don't like the idea of maintaining a completely different
build system for gentoo than the "standard" pylucene system. Whatever
I do, I'd like to see it integrated, so that gentoo and all of the
other platforms can use it. One ring, ahem build ahem, to rule them
all...

Jacob

> Wow, I was not aware that one could use 'ant' to build Python things.
> Even though PyLucene/JCC is bridging both the Java and Python worlds, its
> intended audience is Python developers. I don't expect Python developers to
> use 'ant' in their everyday development tasks.
>
> That being said, if you submit a fully functional, not gentoo-specific,
> build.xml ant script for PyLucene, that would be an improvement over the GNU
> Makefile for Windows users since running it relies on Cygwin. I wouldn't get
> rid of Makefile just then but time and usage would tell us where to focus
> thus duplicated maintenance efforts.
>
> It would be better, though, and more pythonic, to build a setup.py
> setuptools file for PyLucene instead. That would make it possible to get rid
> of Makefile just as well and be more fitting with the Python ways.
>
> Andi..
>

Re: Replacing the Makefile

Posted by Andi Vajda <va...@apache.org>.
On Tue, 17 Feb 2009, Jacob Floyd wrote:

> Have you considered replacing the Makefile with a pure build.xml
> replacement? As the gentoo ebuild was not as readable as the gentoo
> devs would have liked, they had me write it so that I could use
> pyAntTasks ( http://www.rpstechnologies.net/PyAntTasks.html
> http://code.google.com/p/pyanttasks/ ) to take care of running the
> python script. If you'd like I can send a copy to the list, or check
> out the build.xml here (for 30 days of course):
> http://dpaste.com/121964/ The only things I didn't include were the
> test, distrib, and this doesn't download or compile lucene. It assumes
> that the lucene jars are in the same directory as build.xml (which is
> done from the ebuild). I use the following options on the commandline
> when running ant to use this which sets several variables to gentoo
> specific variables.
>
> ant install (or build) -f "build.xml" \
> -Dpython=${python} -Dversion=${MY_PV} -Dlucene.pv=${LUCENE_PV} \
> -Dpython.modname=${PYTHON_MODNAME} -Dpython.sitedir=$(python_get_sitedir) \
> -Dgentoo.numfiles=2 -Dgentoo.debug=${DEBUG_OPT} -Dgentoo.root=${D} \
> -Dgentoo.work=${S}
>
> Perhaps this can be reused. I hope so. What do you all think of
> replacing the Makefile like this using ant?

Wow, I was not aware that one could use 'ant' to build Python things.
Even though PyLucene/JCC is bridging both the Java and Python worlds, its 
intended audience is Python developers. I don't expect Python developers to 
use 'ant' in their everyday development tasks.

That being said, if you submit a fully functional, not gentoo-specific, 
build.xml ant script for PyLucene, that would be an improvement over the GNU 
Makefile for Windows users since running it relies on Cygwin. I wouldn't get 
rid of Makefile just then but time and usage would tell us where to focus 
thus duplicated maintenance efforts.

It would be better, though, and more pythonic, to build a setup.py 
setuptools file for PyLucene instead. That would make it possible to get rid 
of Makefile just as well and be more fitting with the Python ways.

Andi..