1- name : Build WinPython Dot 3.13, # fix to build #5, Copilote AI pwsh was not a so good idea
2-
1+ name : Build WinPython Dot 3.13.6 , # 2025-08-14: python-3.13.6, before 3.13.7 (the 15th...)
2+ # later we can use matrix https://github.com/orgs/community/discussions/7835#discussioncomment-1769026
33on :
44 workflow_dispatch :
55
@@ -10,84 +10,103 @@ jobs:
1010 - name : Checkout repository
1111 uses : actions/checkout@v4
1212
13- - name : Download python-3.13 standalone
14- # shell: cmd
15- run : |
16- #curl -L -o python-3.13-embed.zip https://github.com/indygreg/python-build-standalone/releases/download/20240421/cpython-3.13.0b1+20240421-x86_64-pc-windows-msvc-shared-install_only.zip
17- curl -L -o python-3.13-embed.zip https://github.com/astral-sh/python-build-standalone/releases/download/20250807/cpython-3.13.6+20250807-x86_64-pc-windows-msvc-install_only_stripped.tar.gz
18- - name : Show downloaded file info
19- shell : pwsh
13+ - name : set variables
14+ shell :
2015 run : |
21- Get-Item python-3.13-embed.zip | Format-List Name,Length,LastWriteTime
16+ echo "build_location=WPy64-31360b3" >> $GITHUB_ENV
17+ echo "python_source=https://github.com/astral-sh/python-build-standalone/releases/download/20250814/cpython-3.13.6+20250814-x86_64-pc-windows-msvc-install_only_stripped.tar.gz"
18+ echo "python_sha256=09e489d2e7123cbd8111293e91af08efd203c9229c9e761ba3995bb263a6fa92"
2219
23- - name : Wait before extraction
24- shell : pwsh
25- run : |
26- Start-Sleep -Seconds 2
20+ echo "WINPYINSTALLER=7zip.zip" >> $GITHUB_ENV
21+ echo "WINPYVERSION=313" >> $GITHUB_ENV
2722
28- - name : Extract python-3.13-embed.zip
29- # shell: pwsh
23+ echo "WINPYthon_exe=python.exe" >> $GITHUB_ENV
24+ echo "WINPYthon_subdirectory_name=python" >> $GITHUB_ENV
25+ echo "WINPYVER=3.13.6.0dotb3" >> $GITHUB_ENV
26+ echo "WINPYVER2=3.13.6.0" >> $GITHUB_ENV
27+ echo "WINPYFLAVOR=dot" >> $GITHUB_ENV
28+ echo "WINPYARCH=64" >> $GITHUB_ENV
29+
30+ echo "WINPYrequirements=winpython\portable\cycle_2025_04\requir.64-3_13_5_1dotb3.txt" >> $GITHUB_ENV
31+
32+ - name : Download python-3 standalone
33+ run : |
34+ curl -L -o python-$WINPYVERSION-embed.tar.gz $python_source
35+ # Calculate SHA256 hash
36+ actual_hash=$(sha256sum python-$WINPYVERSION-embed.tar.gz | cut -d' ' -f1)
37+
38+ if [ "$actual_hash" = "$python_sha256" ]; then
39+ echo "Hash matches."
40+ else
41+ echo "Hash does NOT match."
42+ echo "$actual_hash"
43+ echo "$python_sha256"
44+ exit 1
45+ fi
46+
47+ - name : Extract python-$WINPYVERSION-embed.tar.gz to dotpython
3048 run : |
31- #New-Item -ItemType Directory -Path dotpython
32- #Expand-Archive -Path python-3.13-embed.zip -DestinationPath dotpython
3349 mkdir dotpython
34- tar -xf python-3.13-embed.zip -C dotpython
50+ tar -xf python-$WINPYVERSION-embed.tar.gz -C dotpython
51+
52+ # - name: re-compress archive in zip for usual worflow
53+ # shell: pwsh
54+ # run: |
55+ # Compress-Archive -Path build_output\* -DestinationPath python-3.13.6.amd64.zip
3556
3657 - name : Copy launchers_final files to dotpython
37- # enriching things: will need one python to play on the other, so why not there too
38- # shell: bash
39- shell : pwsh
58+ # enriching things: dotpython can be used as the building python
59+ # shell: pwsh
4060 run : |
4161 # would run with shell: bash
42- # cp -r winpython/portable/launchers_final/* dotpython/
43- if (-not (Test-Path "dotpython")) { New-Item -ItemType Directory -Path "dotpython" | Out-Null }
44- Copy-Item -Path "winpython/portable/launchers_final/*" -Destination "dotpython/" -Recurse -Force
62+ cp -r winpython/portable/launchers_final/* dotpython/
63+ # would run with shell: pwsh
64+ #if (-not (Test-Path "dotpython")) { New-Item -ItemType Directory -Path "dotpython" | Out-Null }
65+ #Copy-Item -Path "winpython/portable/launchers_final/*" -Destination "dotpython/" -Recurse -Force
4566
67+ - name : Write env.ini file
68+ shell : pwsh
69+ run : |
70+ $destDir = "$env:build_location\python\scripts"
71+ echo "WINPYthon_exe=$env:WINPYthon_exe" > env.ini
72+ echo "WINPYthon_subdirectory_name=$env:WINPYthon_subdirectory_name" >> env.ini
73+ echo "WINPYVER=$env:WINPYVER" >> env.ini
74+ echo "WINPYVER2=$env:WINPYVER2" >> env.ini
75+ echo "WINPYFLAVOR=$env:WINPYFLAVOR" >> env.ini
76+ echo "WINPYARCH=$env:WINPYARCH" >> env.ini
77+ Copy-Item -Path "env.ini" -Destination "$destDir\env.ini"
78+
4679 - name : List dotpython contents (for debugging)
4780 shell : pwsh
4881 run : |
49- #Get-ChildItem -Recurse dotpython
5082 Get-ChildItem dotpython
5183
5284 - name : Prepare WinPython target dot structure
5385 shell : pwsh
5486 run : |
55- New-Item -ItemType Directory -Path WPy64-31351b3
56- # Get-ChildItem dotpython | Move-Item -Destination WinPython-dot-3.13
57- # fix: Usually, indygreg zips extract all files directly into the target, not into a subfolder: dotpython/python.exe, dotpython/Lib, etc.
58- Get-ChildItem -Path dotpython -Force | Move-Item -Destination WPy64-31351b3 -Force
87+ New-Item -ItemType Directory -Path $env:build_location
88+ Get-ChildItem -Path dotpython -Force | Move-Item -Destination $env:build_location -Force
5989 # Add more WinPython-specific folders/files here if needed
6090
61- - name : try upgrade pip
91+ - name : upgrade pip to get icons launchers
6292 shell : pwsh
6393 run : |
64- WPy64-31351b3 \python\python.exe -m pip install --upgrade pip
94+ & "$env:build_location \python\python.exe" -m pip install --upgrade pip
6595
66- - name : try download requirements as hashed-requirements
67- shell : pwsh
68- run : |
69- WPy64-31351b3\python\python.exe -m pip download --dest dotpython\wheelhouse --no-deps --require-hashes -r "winpython\portable\cycle_2025_04\requir.64-3_13_5_1dotb3.txt"
70- #WPy64-31351b3\python\python.exe -m pip install --no-deps --no-index --trusted-host=None --find-links=dotpython\wheelhouse --require-hashes -r "winpython\portable\cycle_2025_04\requir.64-3_13_5_1dotb3.txt"
71-
72- - name : try install requirements as hashed-requirements
73- shell : pwsh
74- run : |
75- WPy64-31351b3\python\python.exe -m pip install --no-deps --no-index --trusted-host=None --find-links=dotpython\wheelhouse --require-hashes -r "winpython\portable\cycle_2025_04\requir.64-3_13_5_1dotb3.txt"
76-
77- - name : List dotpython contents (for debugging)
96+ - name : download requirements as hashed-requirements in dotpython\wheelhouse
7897 shell : pwsh
7998 run : |
80- Get-ChildItem -Recurse dotpython\wheelhouse
99+ & "$env:build_location\python\python.exe" -m pip download --dest dotpython\wheelhouse --no-deps --require-hashes -r $env:WINPYrequirements
81100
82- - name : List WPy64-31351cloudb3 contents (for debugging)
101+ - name : install requirements as hashed-requirements from dotpython\wheelhouse
83102 shell : pwsh
84103 run : |
85- Get-ChildItem WPy64-31351b3
104+ & "$env:build_location\python\python.exe" -m pip install --no-deps --no-index --trusted-host=None --find-links=dotpython\wheelhouse --require-hashes -r $env:WINPYrequirements
86105
87- - name : List WPy64-31351cloudb3 Mardowned content (for debugging)
106+ - name : List build_location Markdowned content (for debugging)
88107 shell : pwsh
89108 run : |
90- WPy64-31351b3 \python\python.exe -m wppm -md
109+ & "$env:build_location \python\python.exe" -m wppm -md
91110
92111 # step avoided: upload-artifact will also .zip it (perplexity AI advising)
93112 # - name: Zip the result
98117 - name : Upload WinPython folder as artifact
99118 uses : actions/upload-artifact@v4
100119 with :
101- name : WinPython64-3.13.5.1dotcloudb3
102- path : WPy64-31351b3
120+ name : WinPython64-3.13.6.0dotcloudb3
121+ path : WPy64-31360b3
0 commit comments