This probably happens because of that .. in the file path.
It is very common for frontends/installers to build a sdist first and then build a wheel out of it. This means that your code may be first turned into a tag.gz and extracted into a temporary directory and then used to build the wheel.
How should I manage references to c / h files that are relative to setup.py?
You can manage the files under the same directory, but not up in the tree.
Yes the .. is the issue. I’m trying to build a static fribidi python interface based on pyfribidi. The python packaging community don’t seem to have any way to insist on having specific libraries available at build or install time. I suppose I could use python-git as a build requirement and use that if the source files are not found.
After a few tries I find that most of my problems with the pip wheel command are because all file system references should be relative.
Using setup.py directly os.path.join(os.path.dirname(__file__),'fribidi-src') is fine, but when pip is used __file__ is different and then I need to use just 'fribidi-src'.
After understanding that I managed to use git, meson & ninja to obtain the needed files.