Skip to content

[Feature Request] Optionally build wheels with bdist_wheel instead of pip #486

@Time0o

Description

@Time0o

I'm in the following situation: I'm trying to build a a C++/Python project structured like this:

├── CMakeLists.txt
├── include
├── source
└── python
    ├── setup.py
    └── ...

i.e. Python code and bindings are separated from the main C++ source code.

Now, I'm unable to to build this project with cibuildwheels because when pip wheel ... is executed from the package directory (python in this case), pip copies the contents of that directory to a temporary directory before running setup.py. At this point there is no clean way (it seems) of referencing my project's root directory from setup.py anymore so the toplevel CMakeLists.txt can't be found and the build fails.

I have previously used multibuild which offers the option of building with python setup.py bdist_wheel instead, avoiding this problem. I think it would be sensible of making this possible with cibuildwhells as well by adding a command line option and modifying linux.py etc. Is this pull-request worthy?

EDIT: to clarify, my setup.py invokes CMake to build the C++ code as well as the Python bindings.

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