Skip to content

Commit

Permalink
embedded_python_interpreter: fix python library path
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
  • Loading branch information
lpawelcz committed Jun 16, 2023
1 parent 94502f9 commit 55b7449
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@
for pv in ('LIBDIR', 'LIBPL')
]

if 'rules_hdl_cpython' in config_vars['prefix']:
# Hack: Work around broken library paths in the hermetic Python toolchain.
# It reports that the library path is an absolute path like
#
# /install/lib/libpython3.8.so
#
# This path doesn't exist. So we'll fix it here.
file_paths = [path.replace('/install', config_vars['prefix']) for path in file_paths]

print(list(filter(os.path.exists, file_paths))[0])

0 comments on commit 55b7449

Please sign in to comment.