mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-23 05:50:18 +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
31
.github/workflows/windows-build.yml
vendored
31
.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
|
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 }}
|
& 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
|
# Resolve python root from setup-python
|
||||||
<<<<<<< ours
|
|
||||||
=======
|
|
||||||
New-Item -Path "C:\gtk-build\python-3.14" -ItemType Directory -Force | Out-Null
|
|
||||||
>>>>>>> theirs
|
|
||||||
|
|
||||||
$pyRoot = $env:pythonLocation
|
$pyRoot = $env:pythonLocation
|
||||||
if (-not $pyRoot) {
|
if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" }
|
||||||
$pyRoot = & python -c "import sys; print(sys.prefix)"
|
|
||||||
|
# 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 }
|
||||||
|
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = "C:\gtk-build\python-3.14.2\${{ 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
|
|
||||||
|
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install cffi
|
python -m pip install cffi
|
||||||
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||||
|
|||||||
Reference in New Issue
Block a user