I need help on the issue of replacing the original C math library with an external C math library

Hello developers, The external math library contains some dynamic link libraries of C language (.so files) and some C header files (.h files), I am tring to link my custom library to NumPy and replace the original bottom math library. I need to add several compile options to the C compiler (gcc etc.), but I have not found the corrosponding part of NumPy source code. Merely modifying 'site.cfg' does not work at all, and then adding lib and include directory to '~/numpy/distutils/system_info.py' still does not work. When compiling NumPy source code, it gives a fatal error: myBLAS.h: No such file or directory. My doubts: Which code file should I focus on? How to modify configurations and add compile options like '-I /path/to/includes -L /path/to/libs -lmyBLAS'? Could you please give me a hint? Looking forward to your reply. Thanks!

Sorry for the late reply, this ended up in my SPAM filter. I think google does not like your qq.com domain.
The best way to manage blas/lapack implementations right now is via the site.cfg file, the example site.cfg.example has extensive instructions. If it is not working as expected, please share what you have so far so we can help you, it may be a simple typo. Matti
On Tue, Aug 2, 2022 at 3:42 PM 454626566@qq.com wrote:
Hello developers, The external math library contains some dynamic link libraries of C language (.so files) and some C header files (.h files), I am tring to link my custom library to NumPy and replace the original bottom math library. I need to add several compile options to the C compiler (gcc etc.), but I have not found the corrosponding part of NumPy source code. Merely modifying 'site.cfg' does not work at all, and then adding lib and include directory to '~/numpy/distutils/system_info.py' still does not work. When compiling NumPy source code, it gives a fatal error: myBLAS.h: No such file or directory. My doubts: Which code file should I focus on? How to modify configurations and add compile options like '-I /path/to/includes -L /path/to/libs -lmyBLAS'? Could you please give me a hint? Looking forward to your reply. Thanks! _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-leave@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: matti.picus@gmail.com
participants (2)
-
454626566@qq.com
-
matti picus