[python] fix install_packages.py: use 'uv build --wheel' instead of non-existent 'uv pip wheel'#10636
Closed
msyyc wants to merge 8 commits into
Closed
[python] fix install_packages.py: use 'uv build --wheel' instead of non-existent 'uv pip wheel'#10636msyyc wants to merge 8 commits into
msyyc wants to merge 8 commits into
Conversation
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/91e8124d-723d-42e3-a606-d2e9fa8cd443 Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
…ft/typespec into copilot/fix-issue-with-typespec
…on-existent 'uv pip wheel'
'uv pip wheel' is not a real subcommand of uv (the PipCommand enum only
has compile/sync/install/uninstall/freeze/list/show/tree/check), so
'tests/install_packages.py build <flavor>' fails with:
error: unrecognized subcommand 'wheel'
whenever uv is on PATH (which it is in CI via mise). The previous
fallback only caught FileNotFoundError, so it never kicked in when uv
was present-but-incompatible.
Replace with 'uv build --wheel --no-build-logs --out-dir <dir> <pkg>'
(the same approach Azure/typespec-azure used before the recent sync),
build packages one at a time so a single broken pyproject.toml does
not poison the whole batch, and accept partial success (failed
packages will be installed from source by 'install_packages').
Tested locally: 'venv/Scripts/uv.exe build --wheel --help' resolves
correctly on uv 0.11.x (and the command has existed since uv 0.4).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
msyyc
added a commit
to Azure/typespec-azure
that referenced
this pull request
May 9, 2026
…eing wrapper-owned
Following the recent commits that:
- removed ests/tox.ini and generator/ from sync.ts INCLUDES (now
wrapper-owned, committed)
- removed generator/ from .gitignore (now tracked)
- committed tests/requirements/* and tests/conftest.py as synced snapshots
…the prose comments around the INCLUDES list and the gitignore header
no longer matched what's actually being synced. Refresh them so a new
reader can tell at a glance:
* which files are upstream-truth (kept aligned via pnpm sync)
* which files are wrapper-owned (and *why* — including the upstream
install_packages.py bug tracked in microsoft/typespec#10636)
* which synced paths are gitignored vs committed snapshots
No behavior change.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Problem
tests/install_packages.py build <flavor>currently runs:But
uv pip wheelis not a real uv subcommand. ThePipCommandenum only containscompile / sync / install / uninstall / freeze / list / show / tree / check(see crates/uv-cli/src/lib.rs). Reproduced locally on uv 0.11.x:The existing fallback only catches
FileNotFoundError, so when uv is present (which it always is in CI viamise), the whole job dies withCalledProcessError.Fix
uv build --wheel --no-build-logs --out-dir <dir> <pkg>(the command that has actually existed since uv 0.4).pyproject.tomlno longer poisons the whole batch.CalledProcessErrorper package, log a warning, and accept partial success — packages that failed to wheelize will be installed from source byinstall_packages()later.uv->pip wheelfallback for environments where uv is genuinely missing.This matches the working pattern that
Azure/typespec-azure'sinstall_packages.pyhad before it was overwritten by syncing this file from upstream.