sagemath/sagemath-jmol.patch
2013-04-22 14:11:03 -03:00

30 lines
1.7 KiB
Diff

diff -up sage-5.8/spkg/build/sage-5.8/sage/interfaces/jmoldata.py.orig sage-5.8/spkg/build/sage-5.8/sage/interfaces/jmoldata.py
--- sage-5.8/spkg/build/sage-5.8/sage/interfaces/jmoldata.py.orig 2012-11-10 12:03:07.742817945 -0200
+++ sage-5.8/spkg/build/sage-5.8/sage/interfaces/jmoldata.py 2012-11-10 12:03:34.499818970 -0200
@@ -86,7 +86,7 @@ class JmolData(SageObject):
sage_makedirs(jmolscratch)
scratchout = os.path.join(jmolscratch,"jmolout.txt")
jout=open(scratchout,'w')
- testjavapath = os.path.join(SAGE_LOCAL, "share", "jmol", "testjava.sh")
+ testjavapath = os.path.join(SAGE_LOCAL, "bin", "testjava.sh")
result = subprocess.call([testjavapath],stdout=jout)
jout.close()
if (result == 0):
@@ -167,8 +167,6 @@ class JmolData(SageObject):
"""
if (self.is_jvm_available()):
- # Set up paths, file names and scripts
- jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar")
launchscript = ""
if (datafile_cmd!='script'):
launchscript = "load "
@@ -185,7 +183,7 @@ class JmolData(SageObject):
scratchout = os.path.join(jmolscratch,"jmolout.txt")
jout=open(scratchout,'w')
#now call the java application and write the file.
- result = subprocess.call(["java","-Xmx512m","-Djava.awt.headless=true","-jar",jmolpath,"-iox","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout)
+ result = subprocess.call(["jmol","-n","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout)
jout.close()
else:
errStr = "Java Virtual Machine not available.\n"