That step didn't help me. I even have my jython script updated with those settings, but it still fails to populate sys.executable.
Code:
[springpython@web35 Amara-1.2a2]$ java -Dpython.executable="$0" -Dpython.home="/home/springpython/jython2.5b0" -classpath "$CP" org.python.util.jython setup.py install
sys.executable = None
Traceback (most recent call last):
File "setup.py", line 7, in <module>
from setuptools import setup, find_packages
File "/home/springpython/jython2.5b0/Lib/site-packages/setuptools-0.6c9-py2.5.egg/setuptools/__init__.py", line 2, in <module>
File "/home/springpython/jython2.5b0/Lib/site-packages/setuptools-0.6c9-py2.5.egg/setuptools/extension.py", line 2, in <module>
File "/home/springpython/jython2.5b0/Lib/site-packages/setuptools-0.6c9-py2.5.egg/setuptools/dist.py", line 5, in <module>
File "/home/springpython/jython2.5b0/Lib/site-packages/setuptools-0.6c9-py2.5.egg/setuptools/command/install.py", line 2, in <module>
File "/home/springpython/jython2.5b0/Lib/distutils/command/install.py", line 15, in <module>
from distutils.sysconfig import get_config_vars
File "/home/springpython/jython2.5b0/Lib/distutils/sysconfig.py", line 30, in <module>
argv0_path = os.path.dirname(os.path.abspath(sys.executable))
File "/home/springpython/jython2.5b0/Lib/posixpath.py", line 413, in abspath
if not isabs(path):
File "/home/springpython/jython2.5b0/Lib/posixpath.py", line 51, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
[springpython@web35 Amara-1.2a2]$
My jython script is now
Code:
#!/bin/sh
CP=/home/springpython/jython2.5b0/jython-complete.jar
if [ ! -z $CLASSPATH ]
then
CP=$CP:$CLASSPATH
fi
java -Dpython.executable="$0" -Dpython.home="/home/springpython/jython2.5b0" -classpath "$CP" org.python.util.jython "$@"