Replies: 1 comment 1 reply
-
Evaluating the globs later would be doable, but it's not really ideal to write the files back into the source folder in the wheel stage. I can think of two options: The one that works now would be to enable The other would be a feature I recently realized was missing when looking at hatchling, and have been planning to add. We can expose a |
Beta Was this translation helpful? Give feedback.
-
Summary:
I'd like to make sure I include the licenses of bundled wheel dependencies. The tricky bit is that these are optional dependencies, so the license files aren't available until/unless FetchContent retrieves them. What's the best way to get the license files into wheels when the dependencies are bundled in the wheel?
Detail:
pyzmq optionally bundles two libraries via FetchContent. When it does so, I think the licenses should be added to wheel.license-files metadata. It appears that the license-files globs are evaluated prior to build, making it a bit tricky to make sure these are included when they should be.
What's the best strategy for including license files of optional dependencies that might be fetched during cmake configure? I tried
with
but realize the globs are probably evaluated before that COPY_FILE. Running build a second time (with
--no-isolation
) results in the files being included.For my official wheels, I realize I can download the licenses by hand in e.g. cibuildwheel before_all, but it would be nice to have a general solution for the standard CMake way of bundling dependencies to also include license files. I don't know if it's as simple as delaying license_file_globs evaluation until after cmake.
Beta Was this translation helpful? Give feedback.
All reactions