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..