Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
755475c
Add uv-build opt-in support
Copilot Apr 30, 2026
7643258
Validate uv-build install path issue
Copilot Apr 30, 2026
69357cb
Fix uv-build pre-use install path
Copilot Apr 30, 2026
6c71613
Address uv-build validation feedback
Copilot Apr 30, 2026
1c0976a
Address final uv-build review feedback
Copilot Apr 30, 2026
7911065
Clarify uv-build extraction assumptions
Copilot Apr 30, 2026
466a87d
Polish uv-build diagnostics
Copilot Apr 30, 2026
96dd054
Address last uv-build validation feedback
Copilot Apr 30, 2026
54c67e7
Address final uv-build polish feedback
Copilot Apr 30, 2026
34659e2
Add uv-build archive mirror support
Copilot Apr 30, 2026
63024b8
Address mirror validation feedback
Copilot Apr 30, 2026
7c93a43
Polish mirror review diagnostics
Copilot Apr 30, 2026
810fb1e
Address remaining mirror validation polish
Copilot Apr 30, 2026
839a6e3
Clean up final mirror validation comments
Copilot Apr 30, 2026
3636d16
Document API response metadata requirements
Copilot May 1, 2026
cb7397c
Adapt uv-build to upstream asset metadata
Copilot May 1, 2026
2ac5b8c
Harden uv-build asset handling
Copilot May 1, 2026
fbff447
Use vfox archiver for uv-build extraction
Copilot May 1, 2026
39bb1cd
Add uv-build CI version test
Copilot May 1, 2026
6527163
Tighten uv-build CI version check
Copilot May 1, 2026
d57238c
Add Windows uv-build CI test
Copilot May 1, 2026
ac94689
Fix Windows uv-build query and pip setup
Copilot May 1, 2026
3fbe632
Clarify uv-build pip setup errors
Copilot May 1, 2026
899c34d
Refactor Windows pip output redirect
Copilot May 1, 2026
1d5aff0
Clarify Windows pip command construction
Copilot May 1, 2026
3505884
Polish Windows uv-build pip setup
Copilot May 1, 2026
f4ce68d
Format Windows pip install commands
Copilot May 1, 2026
19b8e92
Remove Windows pip output redirect
Copilot May 1, 2026
e7782fd
Clarify uv-build pip messages
Copilot May 1, 2026
ef8f572
Handle missing Windows uv-build python explicitly
Copilot May 1, 2026
6ddeed5
Clarify Windows uv-build pip output
Copilot May 1, 2026
9bb3195
Simplify uv-build pip warning
Copilot May 1, 2026
dd1af08
Fix Windows uv-build sha256 verification
Copilot May 1, 2026
660b6ec
Clarify certutil hash output parsing
Copilot May 1, 2026
b613910
Make Windows hash match path explicit
Copilot May 1, 2026
31818b3
Clarify Windows sha256 failure paths
Copilot May 1, 2026
c67ccc2
Normalize expected uv-build sha256
Copilot May 1, 2026
0da3cd2
Report actual Windows uv-build hash
Copilot May 1, 2026
68f983c
Simplify Windows hash comparison
Copilot May 1, 2026
d176eae
Use Lua nil default for actual hash
Copilot May 1, 2026
67fb703
Handle certutil output read explicitly
Copilot May 1, 2026
2c1d335
Guard certutil read and close
Copilot May 1, 2026
e3c2e88
Use SHA256 length constant
Copilot May 1, 2026
f590d94
Use Get-FileHash for Windows uv-build sha256
Copilot May 1, 2026
c9d0916
Harden Windows hash quoting and CI failure check
Copilot May 1, 2026
54eaf46
Use install artifact check in Windows CI
Copilot May 1, 2026
88ffa31
Check uv-build Python version in install step
Copilot May 1, 2026
ffd2607
Pass Windows hash path as PowerShell literal
Copilot May 1, 2026
20c290f
Pass hash path as PowerShell argument
Copilot May 1, 2026
3fbcf6b
Clarify Windows hash command constants
Copilot May 1, 2026
5f88bfe
Clarify hash parsing and CI version errors
Copilot May 1, 2026
57cb154
Require exact Get-FileHash output
Copilot May 1, 2026
5b6c2cf
Extract Windows hash command builder
Copilot May 1, 2026
c45e87e
Reuse vfox download checksum for uv-build
Copilot May 1, 2026
c467bf4
Clarify uv-build core download helpers
Copilot May 1, 2026
f4a7450
Align uv-build helper naming
Copilot May 1, 2026
c23f3fe
Restore uv-build helper name
Copilot May 1, 2026
2c6bc8e
Validate uv-build PreInstall package
Copilot May 1, 2026
3b29bba
Rename uv-build install package variable
Copilot May 1, 2026
cc47d0d
Consolidate uv-build PreInstall validation
Copilot May 1, 2026
2549872
Clarify uv-build PreInstall error handling
Copilot May 1, 2026
716024e
Clarify uv-build PreInstall validation helpers
Copilot May 1, 2026
2b72f37
Polish uv-build validation naming
Copilot May 1, 2026
0b5f7a4
Document vfox core uv-build handling
Copilot May 1, 2026
5b2a127
Clarify uv-build PreInstall required errors
Copilot May 1, 2026
55bd1a7
Use PowerShell for Windows uv-build pip
Copilot May 1, 2026
7c153fb
Harden PowerShell uv-build pip invocation
Copilot May 1, 2026
126a5dd
Refine PowerShell pip command builder
Copilot May 1, 2026
b9c770a
Polish PowerShell command diagnostics
Copilot May 1, 2026
16a6a3e
Tighten PowerShell command validation
Copilot May 1, 2026
9996985
Clarify PowerShell quoting helper
Copilot May 1, 2026
251e48a
Document PowerShell command assumptions
Copilot May 1, 2026
39e8329
Clarify unsupported command characters
Copilot May 1, 2026
8ece92b
Clarify Windows pip path variables
Copilot May 1, 2026
21052d3
Add Windows uv-build pip shims
Copilot May 1, 2026
a13adf5
Polish Windows pip shim diagnostics
Copilot May 1, 2026
0d6f9a7
Clarify Windows pip shim assumptions
Copilot May 1, 2026
8a4222c
Simplify Windows pip shims
Copilot May 1, 2026
1d0d8ca
Refine Windows pip shim checks
Copilot May 1, 2026
fa9eff7
Document Windows pip shim format
Copilot May 1, 2026
5d20385
Use explicit pip command locals
Copilot May 1, 2026
381e145
Tighten pip shim write error
Copilot May 1, 2026
769df24
Improve pip shim error context
Copilot May 1, 2026
50a250d
Clarify pip availability helper
Copilot May 1, 2026
fcd4398
Close pip shim file safely
Copilot May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/vfox-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ jobs:
exit 1
fi

- name: Install Python 3.10.20 with uv-build
if: matrix.mirror == ''
env:
VFOX_PYTHON_USE_UV_BUILD: "1"
run: |
eval "$(vfox activate bash)"
vfox install python@3.10.20
vfox use -g python@3.10.20
vfox current

- name: Check uv-build python 3.10.20
if: matrix.mirror == ''
run: |
eval "$(vfox activate bash)"
python_version=$(python -c 'import sys;print(sys.version)')
echo $python_version

if [[ ! $python_version == 3.10.20* ]]; then
exit 1
fi

python -m pip --version
pip --version

test-on-windows:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -118,3 +142,44 @@ jobs:
if ($python_version -notlike "${{ matrix.python-version }}*") {
exit 1
}

- name: Install Python 3.10.20 with uv-build
if: runner.os == 'Windows' && matrix.mirror == ''
env:
VFOX_PYTHON_USE_UV_BUILD: "1"
run: |
Invoke-Expression "$(vfox activate pwsh)"
vfox install python@3.10.20
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
vfox use -g python@3.10.20
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
vfox current
$python_version = $(python -c 'import sys;print(sys.version)')
if ($LASTEXITCODE -ne 0) {
Write-Error "failed to run python after uv-build install"
exit $LASTEXITCODE
}
Write-Output $python_version

if ($python_version -notlike "3.10.20*") {
Write-Error "expected uv-build python 3.10.20, got $python_version"
exit 1
}

- name: Check uv-build python 3.10.20
if: runner.os == 'Windows' && matrix.mirror == ''
run: |
Invoke-Expression "$(vfox activate pwsh)"
$python_version = $(python -c 'import sys;print(sys.version)')
Write-Output $python_version

if ($python_version -notlike "3.10.20*") {
exit 1
}

python -m pip --version
pip --version
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,18 @@ is `https://www.python.org/ftp/python/`.
```bash
export VFOX_PYTHON_MIRROR=https://mirrors.huaweicloud.com/python/
```

## uv-build

Set `VFOX_PYTHON_USE_UV_BUILD=1` to install prebuilt Python archives from the
vfox vault uv-build endpoint instead of building from pyenv/python-build.

On Linux, libc is detected automatically. Set `VFOX_PYTHON_UV_LIBC=gnu` or
`VFOX_PYTHON_UV_LIBC=musl` to override detection.

Set `VFOX_PYTHON_UV_BUILD_MIRROR` to download uv-build archives from a mirror.
For example:

```bash
export VFOX_PYTHON_UV_BUILD_MIRROR=https://registry.npmmirror.com/-/binary/python-build-standalone/
```
6 changes: 5 additions & 1 deletion hooks/available.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
require("util")
function PLUGIN:Available(ctx)
if useUvBuild() then
return parseVersionFromUvBuild()
end

if OS_TYPE == "windows" then
return parseVersion()
else
return parseVersionFromPyenv()
end
end
end
4 changes: 4 additions & 0 deletions hooks/post_install.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require("util")
function PLUGIN:PostInstall(ctx)
if useUvBuild() then
return uvBuildInstall(ctx)
end

if OS_TYPE == "windows" then
return windowsInstall(ctx)
else
Expand Down
4 changes: 4 additions & 0 deletions hooks/pre_install.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ function PLUGIN:PreInstall(ctx)
version = self:Available({})[1].version
end

if useUvBuild() then
return uvBuildPreInstall(version)
end

if OS_TYPE == "windows" and not checkIsReleaseVersion(version) then
error("The current version is not released")
return
Expand Down
2 changes: 1 addition & 1 deletion hooks/pre_use.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function PLUGIN:PreUse(ctx)
}
end

local installPath = targetVersion.path
local installPath = resolvePythonInstallPath(targetVersion.path, version)
print("Checking Python installation at: " .. installPath)

-- Perform health check
Expand Down
Loading
Loading