mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-04 04:28:51 -04:00
33 lines
1.5 KiB
Diff
33 lines
1.5 KiB
Diff
diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py
|
|
--- src/sage/interfaces/jmoldata.py.orig 2022-09-19 16:38:18.000000000 -0600
|
|
+++ src/sage/interfaces/jmoldata.py 2023-01-15 17:05:52.942389170 -0700
|
|
@@ -153,8 +153,6 @@ class JmolData(SageObject):
|
|
True
|
|
sage: archive.close()
|
|
"""
|
|
- # Set up paths, file names and scripts
|
|
- jmolpath = os.path.join(JMOL_DIR, "JmolData.jar")
|
|
target_native = targetfile
|
|
|
|
if sys.platform == 'cygwin':
|
|
@@ -176,12 +174,14 @@ class JmolData(SageObject):
|
|
with open(scratchout, 'w') as jout:
|
|
# Now call the java application and write the file.
|
|
env = dict(os.environ)
|
|
- env['LC_ALL'] = 'C'
|
|
- env['LANG'] = 'C'
|
|
- subprocess.call(["java", "-Xmx512m", "-Djava.awt.headless=true",
|
|
- "-jar", jmolpath, "-iox", "-g", size_arg,
|
|
- "-J", launchscript, "-j", imagescript],
|
|
- stdout=jout, stderr=jout, env=env)
|
|
+ env['LC_ALL'] = 'C.UTF-8'
|
|
+ env['LANG'] = 'C.UTF-8'
|
|
+ try:
|
|
+ subprocess.call(["jmol", "-n", "-g", size_arg,
|
|
+ "-J", launchscript, "-j", imagescript],
|
|
+ timeout=300, stdout=jout, stderr=jout, env=env)
|
|
+ except:
|
|
+ pass
|
|
if not os.path.isfile(targetfile):
|
|
raise RuntimeError(f"Jmol failed to create file {targetfile}: {Path(scratchout).read_text()}")
|
|
os.unlink(scratchout)
|