I am building a Python extension module that builds itself from source with CMake, and during the build process a bunch of extra configuration files are auto-generated. I want to copy these files into the final Python package install path.
However, if I specify them with package_data, i.e. in setup.py via
setup(
...
package_data=...
)
then the auto-generated stuff doesn't get picked up. Only files that existed prior to the build step get copied. Is this the wrong way to install generated files? I could try and do some copying within the CMake part of the build I guess, but then the pip package won't really "know" about those files. What is the right way to do this?