1- # Copyright 2015-2024 the openage authors. See copying.md for legal info.
1+ # Copyright 2015-2026 the openage authors. See copying.md for legal info.
22#
33# pylint: disable=too-many-statements
44"""
@@ -22,12 +22,33 @@ def print_version():
2222 The default version printer, unfortunately, inserts newlines.
2323 This is the easiest way around.
2424 """
25+ import platform
26+
2527 from . import LONGVERSION
2628 print (LONGVERSION )
27- from .versions .versions import get_version_numbers
28- version_numbers = get_version_numbers ()
29- for key in version_numbers :
30- print (key .decode ("utf8" ) + " " + version_numbers [key ].decode ("utf8" ))
29+
30+ print ()
31+ print ("== Platform ==" )
32+ print (f"System { platform .system ()} { platform .release ()} " )
33+ print (f"Version { platform .version ()} " )
34+ print (f"Architecture { platform .machine ()} " )
35+ print (f"Python impl { platform .python_implementation ()} { platform .python_version ()} " )
36+ print (f"Executable { sys .executable } " )
37+ print (f"openage path { os .path .dirname (os .path .realpath (__file__ ))} " )
38+ libc_lib , libc_ver = platform .libc_ver ()
39+ if libc_lib :
40+ print (f"libc (probe) { libc_lib } { libc_ver } " )
41+
42+ print ()
43+ print ("== C++ ==" )
44+ try :
45+ from .versions .versions import get_version_numbers
46+ except ImportError :
47+ print ("(unavailable; openage.versions Cython module not built)" )
48+ else :
49+ version_numbers = get_version_numbers ()
50+ for key in version_numbers :
51+ print (key .decode ("utf8" ) + " " + version_numbers [key ].decode ("utf8" ))
3152 sys .exit (0 )
3253
3354
0 commit comments