Skip to content

Fix to correctly locate python DLL on MS-Windows #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Time for a ChangeLog!
## Unreleased
* Fix issue with locating python dll on MS-Windows
[#246](https://github.com/clj-python/libpython-clj/issues/246).

## 2.024
* large dtype-next/hamf upgrade.
* fix for call-attr (it was broken when using keywords).
Expand Down
8 changes: 7 additions & 1 deletion src/libpython_clj2/python/info.clj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ print(json.dumps(
"Failed to find value python executable. Tried %s"
default-python-executables)))))
python-home (find-python-home system-info options)
platform (:platform system-info)
java-lib-path (java-library-path-addendum python-home)
[ver-maj ver-med _ver-min] (:version system-info)
lib-version (format "%s.%s" ver-maj ver-med)
Expand All @@ -105,7 +106,12 @@ print(json.dumps(
libnames (concat [libname]
;;Make sure we try without the 'm' suffix
(when lib-version
[(str "python" lib-version)]))]
[(str "python" lib-version)])
;; The official python dll
;; does not have a dot in
;; its name.
(when (= platform "win32")
[(str "python" ver-maj ver-med)]))]
(merge
system-info
{:python-home python-home
Expand Down