Skip to content

API mode / C sources does not build with default setuptools / build #168

Open
@dgdguk

Description

@dgdguk

When compiling a CFFI module that compiles source code (these instructions), if that source code contains headers, and those headers are used in the C code, it fails with the default invocation of python -m build. This is because CFFI is not able to tell setuptools about the header files, and by default python -m build generates an isolated enviroment containing only the files that setuptools knows about, which will not include the required headers.

A workaround is to pass something like package_data={"": ["*.h"]}, to setuptools.setup, which will grab all .h files, but it may be worth either a) documenting this behaviour or b) augmenting set_source with a headers parameter so it can mark those headers as being required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions