Ok, found a thread where Frank answered this question already.
Following those steps got me started.
I'm reproducing them here just for further reference:
1. download easy_install.py
2. run jython easy_install.py
You are done. Running easy_install will install packages in
2009/9/1 Alexandru Popescu ☀ <the.mindstorm.mailinglist@...>:
> On Tue, Sep 1, 2009 at 2:51 AM, Philip Jenvey<pjenvey@...> wrote:
>> On Aug 31, 2009, at 4:23 PM, Alexandru Popescu ☀ wrote:
>>> Hi guys,
>>> I was wondering if anyone tried to run nose under jython? I must
>>> confess that most probably I've done something wrong as it doesn't
>>> really work for me.
>>> I have both Python 2.5.4 and Jython 2.5.0 installed on my Mac OS
>>> 10.5.8. nose was initially installed using easy_install for Python
>>> 2.5.4. Then I've just copied the
>>> nosetests script to the jython bin directory and modified the first line
>>> but then I'm seeing the following errors when trying to run nosetests
>>> directly from the Terminal
>>> /Users/alex/bin/jython2.5.0/bin/nosetests: line 3: __requires__:
>>> command not found
>>> /Users/alex/bin/jython2.5.0/bin/nosetests: line 4: import: command not
>>> from: can't read /var/mail/pkg_resources
>>> /Users/alex/bin/jython2.5.0/bin/nosetests: line 7: syntax error near
>>> unexpected token `newline'
>>> /Users/alex/bin/jython2.5.0/bin/nosetests: line 7: `sys.exit('
>>> 2. Second attempt was to run jython nosetests test_module.py, but this
>>> results in errors too:
>>> raceback (most recent call last):
>>> File "/Users/alex/bin/jython2.5.0/bin/nosetests", line 5, in <module>
>>> from pkg_resources import load_entry_point
>>> ImportError: No module named pkg_resources
>>> 3. Last I've figured out there might be things installed under Python
>>> 2.5.4 that are not available to Jython, so I went to
>>> CPYTHON/lib/python2.5/site-packages and copied a couple of things from
>>> there and that made it work.
>>> Now, I'm wondering what's the best approach for:
>>> 1. installing nose for Jython (the correct way)
>>> 2. there seems to be a lot of different spots where Python is
>>> installing modules, so I'm wondering if there's a recommended way to
>>> manage these so I can
>>> have a unique place for these to be used from either CPython and Jython
>> The correct way to install nose is the same way you'd install it with
>> CPython, the easiest being with easy_install. Since you need to isolate your
>> Jython packages from CPython packages, I'd highly recommend using
>> virtualenv. It works great with both CPython and Jython
> Thanks Philip, but I don't seem to be able to get setuptools installed
> with jython. I've setup the PYTHONHOME env variable to point to the
> jython install and then:
> sh -v setuptools-0.6c9-py2.5.egg
> if [ `basename $0` = "setuptools-0.6c9-py2.5.egg" ]
> then exec python2.5 -c "import sys, os; sys.path.insert(0,
> os.path.abspath('$0')); from setuptools.command.easy_install import
> bootstrap; sys.exit(bootstrap())" "$@"
> echo $0 is not the correct name for this egg file.
> echo Please rename it back to setuptools-0.6c9-py2.5.egg and try again.
> exec false
> basename $0
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named os
> 2. I've looked at some point into virtualenv and I must confess I'd
> prefer something simpler. But if that's the recommended way I'll check
> it out again.
> Before being able to move forward I'll need to get over 1) above though.
>> Philip Jenvey