How to add header files to setup.py so that dependencies arise when creating extensions?

The question seems long, but it all comes down to how I can add header files to a specific extension specification.

The motivation is that if I change one of the header files, giving

python setup.py build

you should rebuild the extension, even if none of the .c files has changed.

I tried to add dependent header files in the source source keyword in the extension constructor, but ran the resulting setup.py errors with complaints about the unknown .h file extension.

Thank!

+5
source share
1 answer

depends Extension. , .

+7