sagemath/sagemath-jmol.patch
2015-12-22 12:50:40 -02:00

25 lines
1.3 KiB
Diff

diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
--- src/sage/interfaces/jmoldata.py.orig 2015-10-11 17:48:03.194792527 -0300
+++ src/sage/interfaces/jmoldata.py 2015-10-11 17:48:39.748793927 -0300
@@ -146,8 +146,6 @@ class JmolData(SageObject):
sage: print os.path.exists(testfile) # optional -- java
True
"""
- # Set up paths, file names and scripts
- jmolpath = os.path.join(SAGE_LOCAL, "share", "jmol", "JmolData.jar")
target_native = targetfile
import sys
if sys.platform == 'cygwin':
@@ -172,10 +170,8 @@ class JmolData(SageObject):
env = dict(os.environ)
env['LC_ALL'] = 'C'
env['LANG'] = 'C'
- subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true",
- "-jar", jmolpath, "-iox", "-g", sizeStr,
- "-J", launchscript, "-j", imagescript],
- stdout=jout, stderr=jout, env=env)
+ subprocess.call(["jmol","-n","-g",sizeStr,
+ "-J",launchscript,"-j",imagescript],stdout=jout)
if not os.path.isfile(targetfile):
raise RuntimeError("Jmol failed to create file %s, see %s for details"%(repr(targetfile), repr(scratchout)))
os.unlink(scratchout)