mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 16:00:18 +00:00
Refactor Python setup in Windows build workflow
Updated Python installation steps and created symbolic link for Python 3.8.
This commit is contained in:
committed by
GitHub
parent
590d0c50f1
commit
60e696cb1a
18
.github/workflows/windows-build.yml
vendored
18
.github/workflows/windows-build.yml
vendored
@@ -47,11 +47,21 @@ jobs:
|
||||
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
|
||||
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
|
||||
|
||||
New-Item -Path "c:\gtk-build" -Name "python-3.8" -ItemType "Directory"
|
||||
New-Item -Path "c:\gtk-build\python-3.8" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/3.8.10/${{ matrix.arch }}"
|
||||
New-Item -Path "C:\gtk-build\python-3.8" -ItemType Directory -Force | Out-Null
|
||||
|
||||
$pyRoot = $env:pythonLocation
|
||||
if (-not $pyRoot) {
|
||||
$pyRoot = & python -c "import sys; print(sys.prefix)"
|
||||
}
|
||||
|
||||
$target = "C:\gtk-build\python-3.8\${{ matrix.platform }}"
|
||||
if (Test-Path $target) { Remove-Item $target -Recurse -Force }
|
||||
|
||||
New-Item -Path "C:\gtk-build\python-3.8" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi
|
||||
|
||||
C:/hostedtoolcache/windows/Python/3.8.10/${{ matrix.arch }}/python.exe -m pip install cffi
|
||||
shell: powershell
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user