Skip to content

Commit a9e9a33

Browse files
Use get_python_lib to get lib path
1 parent a4df75c commit a9e9a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/lpython/lpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,13 +736,13 @@ def get_data_type(t):
736736
raise NotImplementedError("Platform not implemented")
737737

738738
from numpy import get_include
739-
from distutils.sysconfig import get_python_inc
739+
from distutils.sysconfig import get_python_inc, get_python_lib
740740
python_path = "-I" + get_python_inc() + " "
741741
numpy_path = "-I" + get_include()
742742
rt_path_01 = "-I" + get_rtlib_dir() + "/../libasr/runtime "
743743
rt_path_02 = "-L" + get_rtlib_dir() + " -Wl,-rpath " \
744744
+ get_rtlib_dir() + " -llpython_runtime "
745-
python_lib = "-L" "$CONDA_PREFIX/lib/ -lpython3.10 -lm"
745+
python_lib = "-L" + get_python_lib() + "/../.. -lpython3.10 -lm"
746746

747747
r = os.system("gcc -g" + gcc_flags + python_path + numpy_path +
748748
" a.c -o lpython_jit_module.so " + rt_path_01 + rt_path_02 + python_lib)

0 commit comments

Comments
 (0)