Skip to content

Commit 88fca4a

Browse files
committed
show binary version in scripting; module updates for pixi
1 parent c8a46b0 commit 88fca4a

File tree

3 files changed

+292
-122
lines changed

3 files changed

+292
-122
lines changed

GSASII/GSASIIscriptable.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,20 @@ def ShowVersions():
141141
except:
142142
out += "GSAS-II location: not set\n"
143143
try:
144-
out += f"Binary location: {GSASIIpath.binaryPath}\n"
144+
if GSASIIpath.binaryPath is None:
145+
from . import pyspg
146+
loc = os.path.dirname(pyspg.__file__)
147+
else:
148+
loc = GSASIIpath.binaryPath
149+
try:
150+
f = os.path.join(loc,'GSASIIversion.txt')
151+
with open(f,'r') as fp:
152+
version = fp.readline().strip()
153+
vnum = fp.readline().strip()
154+
dated = f'{vnum}, {version}'
155+
except:
156+
dated = 'undated'
157+
out += f"Binary location: {loc} ({dated})\n"
145158
except:
146159
out += "Binary location: not found\n"
147160
return out

0 commit comments

Comments
 (0)