mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Refactor Python directory setup in Windows build workflow
Updated Python directory creation logic and resolved version discrepancies.
This commit is contained in:
committed by
GitHub
parent
e79564b501
commit
d54669982a
29
.github/workflows/windows-build.yml
vendored
29
.github/workflows/windows-build.yml
vendored
@@ -52,34 +52,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\python-3.14.2" -ItemType Directory -Force | Out-Null
|
||||
<<<<<<< ours
|
||||
=======
|
||||
New-Item -Path "C:\gtk-build\python-3.14" -ItemType Directory -Force | Out-Null
|
||||
>>>>>>> theirs
|
||||
|
||||
# Resolve python root from setup-python
|
||||
$pyRoot = $env:pythonLocation
|
||||
if (-not $pyRoot) {
|
||||
$pyRoot = & python -c "import sys; print(sys.prefix)"
|
||||
}
|
||||
if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" }
|
||||
|
||||
$target = "C:\gtk-build\python-3.14.2\${{ matrix.platform }}"
|
||||
# Create BOTH paths because the .vcxproj hard-codes python-3.14\...
|
||||
foreach ($pyDir in @("C:\gtk-build\python-3.14.2", "C:\gtk-build\python-3.14")) {
|
||||
New-Item -Path $pyDir -ItemType Directory -Force | Out-Null
|
||||
$target = Join-Path $pyDir "${{ matrix.platform }}"
|
||||
if (Test-Path $target) { Remove-Item $target -Recurse -Force }
|
||||
|
||||
<<<<<<< ours
|
||||
New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
=======
|
||||
$aliasTarget = "C:\gtk-build\python-3.14\${{ matrix.platform }}"
|
||||
if (Test-Path $aliasTarget) { Remove-Item $aliasTarget -Recurse -Force }
|
||||
|
||||
New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
New-Item -Path "C:\gtk-build\python-3.14" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
>>>>>>> theirs
|
||||
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||
}
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install cffi
|
||||
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||
|
||||
Reference in New Issue
Block a user