Include header above project root

This is a fairly common problem when you have say a standalone C library as well as a Python package with bindings to the C library in the same repository. A relative lookup of a header (or any other build target) outside the Python package’s source tree is never portable - which you’re finding out here when building a wheel from an sdist, since the sdist doesn’t contain the header.

The question to answer is whether that C library with the header that’s going missing is (a) part of the Python package, or (b) an external dependency. If (a), can you move it to inside the Python package’s source tree? Symlinking is kind of a hack ot achieve that if you cannot reorganize your repo; setuptools may not fully support that, not 100% sure - you’ll have to try. If (b), then you have to make sure that the C library is installed and the headers on the search path whenever you build a wheel.

1 Like