fix(pixi-build-r): resolve license file to absolute path#6215
Merged
baszalmstra merged 1 commit intoMay 26, 2026
Conversation
The R backend emits no `source:` block; the build script invokes `R CMD INSTALL` directly against the package source root. rattler-build's license-copy step looks for `license_file` entries inside the recipe's work directory, which is empty in this configuration, so a bare `LICENSE` filename (as returned by `parse_r_license` for the very common `License: <SPDX> + file LICENSE` form) is never found and the build fails with "No license files were copied". Resolve the filename against `manifest_root` (the same path used as `source_dir` for `R CMD INSTALL`) so the emitted `license_file` is an absolute path that rattler-build can locate without a source directory. This mirrors the fix already applied in `pixi-build-python`.
wolfv
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
pixi-build-rbackend so it can build CRAN-style R packages whoseDESCRIPTIONdeclaresLicense: <SPDX> + file LICENSE(the vast majority of CRAN), including when the package source is fetched viapackage.build.source.git.Previously these builds failed at the final step with
No license files were copied, even though the package itself compiled. PlainLicense: <SPDX>packages were unaffected.How Has This Been Tested?
crates/pixi_build_r/src/metadata.rscoveringMIT + file LICENSE, barefile LICENSE, and non-standard filenames likeLICENCE.cargo test -p pixi-build-r(35 passed, 0 failed). Existinginstasnapshots are unchanged.License: <SPDX> + file LICENSEwith a git source:pixi installnow completes and the resulting conda package contains the LICENSE file underinfo/licenses/. The path-source case still works.AI Disclosure
Tools: Claude
Checklist: