Skip to content

Commit 83e51dc

Browse files
committed
print out architecture information from java's perspective and from python's perspective on startup.
1 parent c7abe1a commit 83e51dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libpython_clj2/python/info.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@
3737
(list python-major python-minor python-micro)"
3838
[executable]
3939
(let [{:keys [out err exit]}
40-
(sh/sh executable "-c" "import sys, json;
40+
(sh/sh executable "-c" "import sys, platform, json;
4141
print(json.dumps(
4242
{'platform': sys.platform,
4343
'prefix': sys.prefix,
4444
'base-prefix': sys.base_prefix,
4545
'executable': sys.executable,
4646
'base-exec-prefix': sys.base_exec_prefix,
4747
'exec-prefix': sys.exec_prefix,
48+
'platform-arch': platform.machine(),
4849
'version': list(sys.version_info)[:3]}))")]
4950
(when (= 0 exit)
5051
(json/read-str out :key-fn keyword))))
@@ -117,6 +118,7 @@ print(json.dumps(
117118
{:python-home python-home
118119
:lib-version lib-version
119120
:libname libname
120-
:libnames libnames}
121+
:libnames libnames
122+
:java-os-arch (System/getProperty "os.arch")}
121123
(when java-lib-path
122124
{:java-library-path-addendum java-lib-path}))))

0 commit comments

Comments
 (0)