Skip to content

Commit

Permalink
More precise python-config selection
Browse files Browse the repository at this point in the history
  • Loading branch information
thierry-martinez committed Feb 26, 2021
1 parent 11bc853 commit 2be0a2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py.ml
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,10 @@ let libpython_from_pkg_config version_major version_minor =
| _ -> None

let libpython_from_python_config version_major version_minor =
let command = Printf.sprintf "python%d-config --ldflags" version_major in
let command =
Printf.sprintf "python%d.%d-config --ldflags" version_major version_minor in
match run_command_opt command false with
Some (words :: _) ->
| Some (words :: _) ->
let word_list = String.split_on_char ' ' words in
let parse_word library_paths word =
if String.length word > 2 then
Expand Down

0 comments on commit 2be0a2f

Please sign in to comment.