Include files
I'd like to include a file in the built wheel. How about packaging anything in a project's Cargo.toml include array?
You can get a list of files with cargo package --list, so packaging them is definitely possible. One problem is that different types of files need to go into different subdirectories of the wheel and it's not clear which one is correct for include. The other is that a crate might be publish to crates.io and to pypi (like e.g. pyo3-pack itself) and you'd get conflict around that.
But how can I add python files that are using my rust lib to the package? Is there somewhere an example for that. :vulcan_salute:
There's currently no way to add python files. The main problem is that afaik python has no conventions on how combine native and python files. It is not clear where the native module (the .so/.pyd) goes relative to the python files. The big projects with c extensions such as numpy or pandas just define locations somewhere in the source tree in their custom build system and gitignore .so and .pyd, but this breaks ide support. Not solving this properly will lead also lead to the weird kind of behaviour setuptools-rust sometimes shows.
For now I recommend to make a package for the rust crate (e.g. by add _backend or _native to your package's name) and another one for the python part, which depends on the rust crate. Using the module-name-is-source-folder-name convention it should be possible to have both in a single git repository without any conflicts.
The use case I had for this didn't pan out. If no one has another use, I suppose this won't be needed.