Finding python site-packages directory with CMake

前端 未结 4 1074
野的像风
野的像风 2020-12-31 05:29

I use CMake to build my application. How can I find where the python site-packages directory is located? I need the path in order to compile an extension to python.

4条回答
  •  灰色年华
    2020-12-31 06:01

    I suggest to use get_python_lib(True) if you are making this extension as a dynamic library. This first parameter should be true if you need the platform specific location (in 64bit linux machines, this could be /usr/lib64 instead of /usr/lib)

提交回复
热议问题