|
1 | 1 | (ns libpython-clj.python.interpreter |
2 | | - (:require [libpython-clj.jna :as libpy ] |
| 2 | + (:require [libpython-clj.jna :as libpy] |
3 | 3 | [libpython-clj.jna.base :as libpy-base] |
4 | 4 | [libpython-clj.python.gc :as pygc] |
5 | 5 | [libpython-clj.python.logging |
|
30 | 30 | (let [{:keys [out err exit]} |
31 | 31 | (sh executable "-c" "import sys, json; |
32 | 32 | print(json.dumps( |
33 | | -{\"platform\": sys.platform, |
34 | | - \"prefix\": sys.prefix, |
35 | | - \"base_prefix\": sys.base_prefix, |
36 | | - \"executable\": sys.executable, |
37 | | - \"base_exec_prefix\": sys.base_exec_prefix, |
38 | | - \"exec_prefix\": sys.exec_prefix, |
39 | | - \"version\": list(sys.version_info)[:3]}))")] |
| 33 | +{'platform': sys.platform, |
| 34 | + 'prefix': sys.prefix, |
| 35 | + 'base_prefix': sys.base_prefix, |
| 36 | + 'executable': sys.executable, |
| 37 | + 'base_exec_prefix': sys.base_exec_prefix, |
| 38 | + 'exec_prefix': sys.exec_prefix, |
| 39 | + 'version': list(sys.version_info)[:3]}))")] |
40 | 40 | (when (= 0 exit) |
41 | 41 | (json/read-str out :key-fn keyword)))) |
42 | 42 |
|
@@ -93,7 +93,7 @@ print(json.dumps( |
93 | 93 | ;; ..: mac and windows are for sys.platform |
94 | 94 | :linux "libpython%s.%sm.so$" |
95 | 95 | :mac "libpython%s.%sm.dylib$" |
96 | | - :windows "python%s.%sm.dll$") |
| 96 | + :win32 "python%s%s.dll$") |
97 | 97 | major minor)))) |
98 | 98 |
|
99 | 99 | (defn python-library-paths |
@@ -131,9 +131,9 @@ print(json.dumps( |
131 | 131 | (let [executable "python3.7" |
132 | 132 | system-info (python-system-info executable) |
133 | 133 | pyregex (python-library-regex system-info)] |
134 | | - (python-library-paths system-info pyregex)) |
| 134 | + (python-library-paths system-info pyregex))) |
135 | 135 | ;;=> ["/usr/lib/x86_64-linux-gnu/libpython3.7m.so" "/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.so"] |
136 | | - ) |
| 136 | + |
137 | 137 |
|
138 | 138 | (defn- ignore-shell-errors |
139 | 139 | [& args] |
@@ -179,8 +179,8 @@ print(json.dumps( |
179 | 179 | ;;get the type of that item if we have seen it before. |
180 | 180 | (defrecord Interpreter [ |
181 | 181 | interpreter-state* ;;Thread state, per interpreter |
182 | | - shared-state* ;;state shared among all interpreters |
183 | | - ]) |
| 182 | + shared-state*]) ;;state shared among all interpreters |
| 183 | + |
184 | 184 |
|
185 | 185 |
|
186 | 186 | ;; Main interpreter booted up during initialize! |
@@ -411,7 +411,7 @@ print(json.dumps( |
411 | 411 | python-executable] |
412 | 412 | :as options}] |
413 | 413 | (when-not (main-interpreter) |
414 | | - (log-info (str "Executing python initialize with options:" options) ) |
| 414 | + (log-info (str "Executing python initialize with options:" options)) |
415 | 415 | (let [{:keys [python-home libname java-library-path-addendum] :as startup-info} |
416 | 416 | (detect-startup-info options) |
417 | 417 | library-names (cond |
|
0 commit comments