fix: skip license-file validation when build.source is git or URL#4994
Merged
baszalmstra merged 4 commits intoprefix-dev:mainfrom Jan 21, 2026
Conversation
When a package specifies a build source via `[package.build.source]`, the license-file and readme files should be validated against the appropriate directory: - Git or URL source: skip validation (files are in remote location) - Path source: validate against the resolved path directory - No source: validate against the manifest directory (default behavior) Previously, pixi would always validate these files against the manifest directory, causing false "file does not exist" errors when the files were expected to be in a different location. Fixes: prefix-dev#4985
ec08326 to
9ead74c
Compare
Contributor
Author
|
While testing this it now looks like the LICENSE cannot be found at all during the build when using an out of source build. I think the reason is that we do not pass the full path to the license to the backend. Will need some more investigation. |
Contributor
|
tested it with the newer pixi-build-python release, your branch fixes the issue. Is there anything else thats need to be done in it? |
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
When a package specifies a build source via
[package.build.source], the license-file and readme files should be validated against the appropriate directory:Previously, pixi would always validate these files against the manifest directory, causing false "file does not exist" errors when the files were expected to be in a different location.
Fixes: #4985
An akward side note is that the license can now never be relative to the
pixi.toml. Im not sure if thats desired.How Has This Been Tested?
There are a large number of unit tests that test different edge cases.
I also user tested this by making a new pixi project and point it to another source folder on my disk. The error disappeared.
AI Disclosure
Tools: Claude Opus 4.5
Checklist:
schema/model.py.