Hi Andi, thanks for the quick reply! I tried once to setup a virtual python env but as far as I remember it didn't work out for me. My module repository has grown large enough now and I don't want to risk breaking any dependencies at the moment by converting to virtual python. I should do so in the future though ..
1. I didn't know about the --home parameter to distutils' install command so I just now added support for it. To use it: - get the latest PyLucene and JCC from svn at http://svn.apache.org/repos/asf/lucene/pylucene/trunk - rebuild jcc and install it with --home as before - in PyLucene's Makefile, set INSTALL_OPT to contain --home <dir> I set INSTALL_OPT=--home $HOME/_python. Then I got the following error: Traceback (most recent call last): File "/usr/lib64/python2.5/runpy.py", line 95, in run_module filename, loader, alter_sys) File "/usr/lib64/python2.5/runpy.py", line 52, in _run_module_code mod_name, mod_fname, mod_loader) File "/usr/lib64/python2.5/runpy.py", line 32, in _run_code exec code in run_globals File "$HOME/_python/lib64/python2.5/site-packages/JCC-2.5-py2.5-linux-x86_64.egg/jcc/__init__.py", line 27, in <module> import jcc.__main__ File "$HOME/_python/lib64/python2.5/site-packages/JCC-2.5-py2.5-linux-x86_64.egg/jcc/__main__.py", line 88, in <module> cpp.jcc(sys.argv) File "$HOME/_python/lib64/python2.5/site-packages/JCC-2.5-py2.5-linux-x86_64.egg/jcc/cpp.py", line 418, in jcc raise ValueError, "Invalid argument: %s" %(arg) ValueError: Invalid argument: --home make: *** [install] Error 255 am I setting INSTALL_OPT correctly? Also, when I ran "make" (STEP 7), it exported first a revision before starting compiling. Is that normal? Thanks again, Manos._ On Sun, Jan 31, 2010 at 10:35 PM, Andi Vajda <va...@apache.org> wrote: > > On Sun, 31 Jan 2010, Manos Tsagias wrote: > > I'm trying to install pyLucene on my home dir (I don't have root access to >> the machine). I'm using the steps from >> http://lucene.apache.org/pylucene/documentation/install.html: >> >> 1. pushd jcc >> 2. <edited setup.py to match my environment> >> 3. python setup.py build >> 4. python setup.py install --home=/my/home/dir >> 5. popd >> 6. <edited Makefile to match my environment> >> 7. make >> 8. make install >> 9. (PENDING) make test (look for failures) >> >> >> Step 8 breaks when make tries to install on the system-wide python >> repository. How can I change this? The JCC egg is correctly installed in >> my >> home repository >> > > Hi Manos, > > You have several options: > > 1. I didn't know about the --home parameter to distutils' install command > so I just now added support for it. To use it: > - get the latest PyLucene and JCC from svn at > http://svn.apache.org/repos/asf/lucene/pylucene/trunk > - rebuild jcc and install it with --home as before > - in PyLucene's Makefile, set INSTALL_OPT to contain --home <dir> > > 2. Instead of using --home at all, consider setting up a virtual Python > environment via virtualenv.py instead: > http://pypi.python.org/pypi/virtualenv > It seems to be a more 'modern' approach to the whole separate python > environment approach. > > - python virtualenv.py ~/_python > - ~/_python/bin/python jcc/setup.py build install > - edit PyLucene's Makefile to set PREFIX to $(HOME)/_python > - make > - make test > - make install > > Andi.. >