Skip to content

Commit b03b4f1

Browse files
authoredJul 14, 2023
Merge pull request #247 from ikappaki/issue/win-support
Fix to correctly locate python DLL on MS-Windows
2 parents aa6d9ba + bb39bdf commit b03b4f1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Time for a ChangeLog!
2+
## Unreleased
3+
* Fix issue with locating python dll on MS-Windows
4+
[#246](https://github.com/clj-python/libpython-clj/issues/246).
5+
26
## 2.024
37
* large dtype-next/hamf upgrade.
48
* fix for call-attr (it was broken when using keywords).

‎src/libpython_clj2/python/info.clj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ print(json.dumps(
9696
"Failed to find value python executable. Tried %s"
9797
default-python-executables)))))
9898
python-home (find-python-home system-info options)
99+
platform (:platform system-info)
99100
java-lib-path (java-library-path-addendum python-home)
100101
[ver-maj ver-med _ver-min] (:version system-info)
101102
lib-version (format "%s.%s" ver-maj ver-med)
@@ -105,7 +106,12 @@ print(json.dumps(
105106
libnames (concat [libname]
106107
;;Make sure we try without the 'm' suffix
107108
(when lib-version
108-
[(str "python" lib-version)]))]
109+
[(str "python" lib-version)])
110+
;; The official python dll
111+
;; does not have a dot in
112+
;; its name.
113+
(when (= platform "win32")
114+
[(str "python" ver-maj ver-med)]))]
109115
(merge
110116
system-info
111117
{:python-home python-home

0 commit comments

Comments
 (0)