You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a medium-sized CMake C++ project which we want to package as a Python module. After some research, I've concluded that cmake_build_extension is the favorite choice.
Is there any chance of using cppimport with it? It seems as if it ignored the CMakeLists.txt altogether, e.g. causing missing header errors.
I am happy to invest some of my time into making this functionality, but I will need some guidence.
So far, cppimport is typically used with small/quick/prototype Python extensions that don't have a pre-existing build system. There is no support for CMake at the moment. What are you hoping to get out of cppimport that CMake doesn't already provide you?
If you're interested, I would be love to hear thoughts on how to integrate pre-existing build systems (like CMake) with cppimport. I would guess that we would need to implement some kind of build configuration detector or include configuration information in the cppimport <% %> section.
Activity
tbenthompson commentedon May 26, 2023
So far,
cppimportis typically used with small/quick/prototype Python extensions that don't have a pre-existing build system. There is no support for CMake at the moment. What are you hoping to get out ofcppimportthat CMake doesn't already provide you?You can see the current build system code here: https://github.com/tbenthompson/cppimport/blob/main/cppimport/build_module.py
It uses the
setuptools.Extensionclass. This is performing the same function that CMake would.If you're interested, I would be love to hear thoughts on how to integrate pre-existing build systems (like CMake) with cppimport. I would guess that we would need to implement some kind of build configuration detector or include configuration information in the cppimport
<% %>section.