Conversation
b8d8711 to
14a60c9
Compare
|
@konstin thanks for all of the great work on this. If you ever need some external testers, please ping me! |
crates/uv-build-backend/src/lib.rs
Outdated
| ("platlib", self.platlib.as_deref()), | ||
| ("headers", self.headers.as_deref()), | ||
| ("scripts", self.scripts.as_deref()), | ||
| ("data", self.data.as_deref()), |
There was a problem hiding this comment.
Might be more ceremony, but if you need to match on them, I might use an enum for the &'static str here.
(But if it's really just used as a label in string form, I think what you have is totally fine.)
There was a problem hiding this comment.
Here, I'm just mapping the key name to the folder name.
6d90f68 to
83003ca
Compare
|
(Sorry for hijacking this PR thread, please let me know if you prefer me to open a separate issue...) Quick question: I'd love to use this feature, but from my brief tests using version I'm having an entry like this in my [tool.uv.wheel.data]
data = "conffiles"When calling 💡 Which is probably what is stated in the 3rd phrase of this PR issue (at least that's my interpretation):
❓ So, is it currently possible somehow to include extra stuff into wheels built by Many thanks! 💚 |
|
Never mind. Found it right after submitting this message: These entries do the job for me: [tool.uv]
package = true
[tool.uv.build-backend]
data = { "data" = "extra_files" }
[build-system]
requires = ["uv_build>=0.7.11,<0.8.0"]
build-backend = "uv_build"Thanks again! 💚 |
Allow including data files in wheels, configured through
pyproject.toml. This configuration is currently only read in the build backend. We'd only start using it in the frontend when we're adding a fast path.Each data entry is a directory, whose contents are copied to the matching directory in the wheel in
<name>-<version>.data/(purelib|platlib|headers|scripts|data). Upon installation, this data is moved to its target location, as defined by https://docs.python.org/3.12/library/sysconfig.html#installation-paths:data: Installed over the virtualenv environment root. Warning: This may override existing files!scripts: Installed to the directory for executables,<venv>/binon Unix or<venv>\Scriptson Windows. This directory is added to PATH when the virtual environment is activated or when usinguv run, so this data type can be used to install additional binaries. Consider usingproject.scriptsinstead for starting Python code.headers: Installed to the include directory, where compilers building Python packages with this package as built requirement will search for header files.purelibandplatlib: Installed to thesite-packagesdirectory. It is not recommended to uses these two options.For simplicity, for now we're just defining a directory to be copied for each data directory, while using the glob based include mechanism in the background. We thereby introduce a third mechanism next to the main includes and the PEP 639 mechanism, which is not what we should finalize on.