8000 align 3.13 build to 3.14 practice · winpython/winpython@1031c0d · GitHub
[go: up one dir, main page]

Skip to content

Commit 1031c0d

Browse files
committed
align 3.13 build to 3.14 practice
1 parent 08bda7b commit 1031c0d

File tree

1 file changed

+106
-12
lines changed

1 file changed

+106
-12
lines changed

.github/workflows/github_workflows_build-all_3.13.yml

Lines changed: 106 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build WinPython Distribution for 3.13
22
# matrix allows to avoid duplicated code in github_workflows_build-dot, github_workflows_build-whl, github_workflows_build-slim
33
# 2025-08-23a: merged code proposed per Gemini 2.5 flash, it corrected also PYTHONIOENCODING="utf-8" error
44
# 2025-08-23b: moved manually to Python-3.13.7
5+
# 2025-08-25a: will use manual uploaded free-threading, as astral doesn't provide
6+
# 2025-08-25b: move up all parameters
57
on:
68
workflow_dispatch:
79

@@ -21,23 +23,49 @@ jobs:
2123
ZIP: "1"
2224
SEVEN_Z: "0"
2325
EXE: "1"
26+
PANDOC: "0"
2427
ARTIFACT_NAME: "publish_313dotc"
28+
python_sourcef: "https://github.com/astral-sh/python-build-standalone/releases/download/20250818/cpython-3.13.7+20250818-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
29+
python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33"
30+
WINPYARCH: "64"
31+
WINPYVERSION: "313"
32+
WINPYVER2: "3.13.7.0"
33+
my_release_level: "b3"
34+
build_location: "WPy64-3170b3"
35+
2536
# WinPython Slim configuration
2637
- FLAVOR: "slimc"
2738
REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0slimb3.txt"
2839
REQUIREMENTS_WHL: ""
2940
ZIP: "0"
3041
SEVEN_Z: "1"
3142
EXE: "1"
43+
PANDOC: "1"
3244
ARTIFACT_NAME: "publish_313slimc"
45+
python_sourcef: "https://github.com/astral-sh/python-build-standalone/releases/download/20250818/cpython-3.13.7+20250818-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
46+
python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33"
47+
WINPYARCH: "64"
48+
WINPYVERSION: "313"
49+
WINPYVER2: "3.13.7.0"
50+
my_release_level: "b3"
51+
build_location: "WPy64-3170b3"
52+
3353
# WinPython Whl configuration
3454
- FLAVOR: "whlc"
3555
REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0dotb3.txt" # Note: Original whl used dotb3 requirements, verify if this is intended
3656
REQUIREMENTS_WHL: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0whlb3_wheels.txt"
3757
ZIP: "0"
3858
SEVEN_Z: "1"
3959
EXE: "0"
60+
PANDOC: "0"
4061
ARTIFACT_NAME: "publish_313whlc"
62+
python_sourcef: "https://github.com/astral-sh/python-build-standalone/releases/download/20250818/cpython-3.13.7+20250818-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
63+
python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33"
64+
WINPYARCH: "64"
65+
WINPYVERSION: "313"
66+
WINPYVER2: "3.13.7.0"
67+
my_release_level: "b3"
68+
build_location: "WPy64-3170b3"
4169

4270
steps:
4371
- name: Checkout repository
@@ -46,16 +74,15 @@ jobs:
4674
- name: Set static variables and Python version
4775
shell: bash
4876
run: |
49-
echo "WINPYARCH=64" >> $GITHUB_ENV
50-
echo "WINPYVERSION=313" >> $GITHUB_ENV
51-
52-
#3.13.7 as the base for now (3.13.6 was skipped)
53-
# Gemini says: can update this section to dynamically select Python versions based on matrix if needed.
54-
echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20250818/cpython-3.13.7+20250818-x86_64-pc-windows-msvc-install_only_stripped.tar.gz" >> $GITHUB_ENV
55-
echo "python_sha256=d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33" >> $GITHUB_ENV
56-
echo "build_location=WPy64-31370b3" >> $GITHUB_ENV
57-
echo "WINPYVER=3.13.7.0${{ matrix.flavor_config.FLAVOR }}b3" >> $GITHUB_ENV
58-
echo "WINPYVER2=3.13.7.0" >> $GITHUB_ENV
77+
# Set matrix-specific variables
78+
echo "WINPYARCH=${{ matrix.flavor_config.WINPYARCH }}" >> $GITHUB_ENV
79+
echo "WINPYVERSION=${{ matrix.flavor_config.WINPYVERSION }}" >> $GITHUB_ENV
80+
81+
echo "build_location=${{ matrix.flavor_config.build_location }}" >> $GITHUB_ENV
82+
83+
echo "WINPYVER2=${{ matrix.flavor_config.WINPYVER2 }}" >> $GITHUB_ENV
84+
echo "my_release_level=${{ matrix.flavor_config.my_release_level }}" >> $GITHUB_ENV
85+
echo "WINPYVER=${{ matrix.flavor_config.WINPYVER2 }}${{ matrix.flavor_config.FLAVOR }}${{ matrix.flavor_config.my_release_level }}" >> $GITHUB_ENV
5986
6087
# Set matrix-specific variables
6188
echo "WINPYFLAVOR=${{ matrix.flavor_config.FLAVOR }}" >> $GITHUB_ENV
@@ -65,11 +92,19 @@ jobs:
6592
echo "WINPY7Z=${{ matrix.flavor_config.SEVEN_Z }}" >> $GITHUB_ENV
6693
echo "WINPYEXE=${{ matrix.flavor_config.EXE }}" >> $GITHUB_ENV
6794
95+
echo "python_sourcef=${{ matrix.flavor_config.python_sourcef }}" >> $GITHUB_ENV
96+
echo "python_sha256f=${{ matrix.flavor_config.python_sha256f }}" >> $GITHUB_ENV
97+
98+
echo "pandoc_source=https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-windows-x86_64.zip" >> $GITHUB_ENV
99+
echo "pandoc_sha256=11eb6dbe5286c9e5edb0cca4412e7d99ec6578ec04158b0b7fe11f7fd96688e5" >> $GITHUB_ENV
100+
68101
- name: See variables
69102
shell: pwsh
70103
run: |
71104
Write-Output "WINPYVERSION is $env:WINPYVERSION"
72105
Write-Output "WINPYFLAVOR is $env:WINPYFLAVOR"
106+
Write-Output "python_sourcef is $env:python_sourcef"
107+
Write-Output "python_sha256f is $env:python_sha256f"
73108
Write-Output "python_source is $env:python_source"
74109
Write-Output "python_sha256 is $env:python_sha256"
75110
Write-Output "WINPYrequirements is $env:WINPYrequirements"
@@ -84,10 +119,11 @@ jobs:
84119
- name: Download python-3 standalone
85120
shell: pwsh
86121
run: |
87-
curl.exe -L -o "python-3-embed.tar.gz" $env:python_source
122+
Write-Output "python_sourcef used is $env:python_sourcef"
123+
curl.exe -L -o "python-3-embed.tar.gz" $env:python_sourcef
88124
# Calculate SHA256 hash
89125
$filePath = "python-3-embed.tar.gz"
90-
$expectedHash = $env:python_sha256
126+
$expectedHash = $env:python_sha256f
91127
92128
$hashObject = Get-FileHash -Path $filePath -Algorithm SHA256
93129
$actualHash = $hashObject.Hash.ToLower()
@@ -124,6 +160,64 @@ jobs:
124160
New-Item -ItemType Directory -Path $env:build_location
125161
Get-ChildItem -Path dotpython -Force | Move-Item -Destination $env:build_location -Force
126162
163+
- name: Download and integrate pandoc binary
164+
shell: pwsh
165+
if: ${{ matrix.flavor_config.PANDOC == '1' }}
166+
run: |
167+
# Define the URL for the Pandoc binary and the target path
168+
$pandocUrl = "https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-windows-x86_64.zip"
169+
$pandocZipPath = "pandoc.zip"
170+
$tempDir = "pandoc_temp"
171+
$targetDir = "$env:build_location\t"
172+
173+
# Download the zip file
174+
Write-Host "Downloading Pandoc from $env:pandoc_source"
175+
curl.exe -L -o $pandocZipPath $env:pandoc_source
176+
177+
# Create a temporary directory for extraction
178+
Write-Host "Creating temporary directory for extraction"
179+
mkdir -p $tempDir
180+
181+
# Unzip the contents to the temporary directory
182+
Write-Host "Extracting archive to temporary directory"
183+
Expand-Archive -Path $pandocZipPath -DestinationPath $tempDir
184+
185+
# Create the final target directory
186+
Write-Host "Creating final target directory: $targetDir"
187+
if (-not (Test-Path -Path $targetDir)) {
188+
mkdir -p $targetDir
189+
}
190+
191+
# Find and copy only the pandoc.exe file
192+
Write-Host "Copying pandoc.exe to $targetDir"
193+
Copy-Item -Path (Join-Path $tempDir "pandoc-3.1.9\pandoc.exe") -Destination $targetDir -Force
194+
195+
# Optional: Verify the contents
196+
Write-Host "Listing contents of $targetDir"
197+
Get-ChildItem -Path $targetDir
198+
199+
# Calculate SHA256 hash
200+
$filePath = $pandocZipPath
201+
$expectedHash = $env:pandoc_sha256
202+
203+
$hashObject = Get-FileHash -Path $filePath -Algorithm SHA256
204+
$actualHash = $hashObject.Hash.ToLower()
205+
206+
if ($actualHash -eq $expectedHash.ToLower()) {
207+
Write-Output "Hash matches."
208+
} else {
209+
Write-Output "Hash does NOT match."
210+
Write-Output "Actual: $actualHash"
211+
Write-Output "Expected: $expectedHash"
212+
exit 1
213+
}
214+
215+
# Optional: Clean up temporary files
216+
Write-Host "Cleaning up temporary files..."
217+
Remove-Item -Path $tempDir -Recurse -Force
218+
Remove-Item -Path $pandocZipPath -Force
219+
220+
127221
- name: Upgrade pip and patch launchers
128222
shell: pwsh
129223
run: |

0 commit comments

Comments
 (0)
0