Skip to content

Compatibility with CMake? #89

Open

Description

@adamryczkowski

Hi!

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.

Activity

  1. tbenthompson commented on May 26, 2023

    @tbenthompson
    Owner

    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?

    You can see the current build system code here: https://github.com/tbenthompson/cppimport/blob/main/cppimport/build_module.py
    It uses the setuptools.Extension class. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions