sagemath/sagemath-jmol.patch
2016-08-20 13:51:55 -04: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 2016-08-08 13:34:51.199532656 -0400
+++ src/sage/interfaces/jmoldata.py 2016-08-08 13:36:16.474535921 -0400
@@ -147,8 +147,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':
@@ -173,10 +171,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)