From: Alexandru P. ☀ <the...@gm...> - 2009-08-31 23:24:11
|
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 from: #!/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python to #!/Users/alex/bin/jython2.5.0/bin/jython 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 found 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 Many thanks in advance, ./alex |