Repository navigation
Set UV_BUILD_CONSTRAINT for uv installer build constraint support - #389
Merged
Merged
Conversation
…AINT uv uses UV_BUILD_CONSTRAINT instead of PIP_BUILD_CONSTRAINT when installing build dependencies. Without this, package-level constraints (from meta.yaml `requirements.constraint`) were ignored when using uv as the installer, causing test failures. Fixes #358
Copilot
AI
changed the title
[WIP] Fix build constraints for pyodide and uv compatibility
Set UV_BUILD_CONSTRAINT for uv installer build constraint support
Jun 15, 2026
Member
|
@copilot add changelog and test |
- Add test_compile_sets_uv_build_constraint to verify UV_BUILD_CONSTRAINT is set alongside PIP_CONSTRAINT/PIP_BUILD_CONSTRAINT in _compile() - Add CHANGELOG entry for the fix
Contributor
Author
Added in 753e71b:
|
Member
|
@copilot don't need a separate test entry, just update the existing test that checks pip_build_constraint and add UV_BUILD_CONSTRAINT there. Also in the changelog entry, use the PR number not the original issue number |
Contributor
Author
Done in the latest commit. Removed the separate test and added |
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.
uvignoresPIP_BUILD_CONSTRAINT/PIP_CONSTRAINTwhen installing build dependencies into isolated environments, using its ownUV_BUILD_CONSTRAINTinstead. This meant per-package constraints defined inmeta.yamlunderrequirements.constraintwere silently skipped whenuvwas the active installer.Changes
pyodide_build/recipe/builder.py: SetUV_BUILD_CONSTRAINTalongsidePIP_CONSTRAINTandPIP_BUILD_CONSTRAINTwhen preparing the build environment inRecipeBuilder._compile().pyodide_build/tests/test_cli.py: Extended the existingtest_build_constraintto also verify thatUV_BUILD_CONSTRAINTis set and matchesPIP_CONSTRAINT/PIP_BUILD_CONSTRAINTin the environment passed topypabuild.build.CHANGELOG.md: Added entry under[Unreleased]documenting the fix.