lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Wilson <chris-pyluc...@aptivate.org>
Subject Changes to enable easy_install of packages using JCC
Date Wed, 01 Feb 2012 13:27:03 GMT
Dear sirs,

I have been working on integrating Apache Tika (in Java) with our 
open source intranet application (in Python/Django) using JCC, as 
described here:

http://blog.aptivate.org/2012/02/01/content-indexing-in-django-using-apache-tika/

In order to make it easy to install Tika (which normally requires mystic 
incantations of JCC) I have packaged it up with jar files and a setup.py 
script. This required some changes to JCC. I hope you will consider these 
for inclusion in your project. I don't believe that they break backwards 
compatibility.

Changes implemented by the attached patch and visible online (formatted) 
at <https://github.com/aptivate/jcc/commits/master>:

* Allow calling cpp.jcc with a --maxheap argument to reduce the heap size, 
as the default doesn't fit in memory on a reasonably small virtual 
machine.

* Allow calling cpp.jcc with --egg-info to generate the egg_info, without 
doing a build.

* Allow calling cpp.jcc with --extra-setup-arg <arg> to pass additional 
arguments to the setup() function call.

Changes that require more work:

* Can JCC please not fail completely if setuptools hasn't been patched? 
Can it monkeypatch it instead, or at least fall back to non-shared mode?

* Why does JCC use non-standard command line arguments like --build and 
--install? Can it be modified to make it easier to invoke from a 
setup.py-style environment, such as exporting a setup() function as 
setuptools does?

* Could JCC be used to generate dynamic proxies at runtime (with a 
performance cost) in Python, to avoid the need for a compiler?

* Could JCC generate a source distribution (sdist) that could be uploaded 
to pypi?

* "setup.py develop" is still broken in the current implementation

* JCC silently skips wrapping methods whose return type it doesn't know 
(for example because I forgot to include a JAR file) which requires a lot 
of debugging to track down and fix. This is doubly hard because it only 
seems to work when installed, so I can't monkey patch it on the fly to 
investigate problems, I have to remember to "setup.py install" each time.

Thanks in advance for your consideration.

Cheers, Chris.
-- 
Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

Mime
View raw message