From 08bda7bca79ac6e7edb3c142a1d2eea63211796b Mon Sep 17 00:00:00 2001 From: stonebig Date: Sun, 24 Aug 2025 19:55:10 +0200 Subject: [PATCH 1/2] adjust 3.14 --- .../workflows/github_workflows_build-all_3.13.yml | 12 +++++++----- .../workflows/github_workflows_build-all_3.14.yml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/github_workflows_build-all_3.13.yml b/.github/workflows/github_workflows_build-all_3.13.yml index 0d661563..3469dad7 100644 --- a/.github/workflows/github_workflows_build-all_3.13.yml +++ b/.github/workflows/github_workflows_build-all_3.13.yml @@ -21,7 +21,7 @@ jobs: ZIP: "1" SEVEN_Z: "0" EXE: "1" - ARTIFACT_NAME: "publish_dotc" + ARTIFACT_NAME: "publish_313dotc" # WinPython Slim configuration - FLAVOR: "slimc" REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0slimb3.txt" @@ -29,7 +29,7 @@ jobs: ZIP: "0" SEVEN_Z: "1" EXE: "1" - ARTIFACT_NAME: "publish_slimc" + ARTIFACT_NAME: "publish_313slimc" # WinPython Whl configuration - FLAVOR: "whlc" REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0dotb3.txt" # Note: Original whl used dotb3 requirements, verify if this is intended @@ -37,7 +37,7 @@ jobs: ZIP: "0" SEVEN_Z: "1" EXE: "0" - ARTIFACT_NAME: "publish_whlc" + ARTIFACT_NAME: "publish_313whlc" steps: - name: Checkout repository @@ -174,6 +174,8 @@ jobs: $destfile_md = "publish_output\WinPython$env:WINPYFLAVOR-$($env:WINPYARCH)bit-$env:WINPYVER2.md" & "$env:build_location\python\python.exe" -m wppm -md | Out-File -FilePath $destfile_md -Encoding utf8 + gc $destfile_md + & "$env:build_location\python\python.exe" -m pip freeze | Out-File -FilePath dotpython\freeze.txt $destfile_pylock = "publish_output\pylock.$env:WINPYARCH-$($env:WINPYVER -replace '\.', '_').toml" & "$env:build_location\python\python.exe" -m pip lock --no-deps --find-links=dotpython\wheelhouse -r dotpython\freeze.txt -o $destfile_pylock @@ -213,10 +215,10 @@ jobs: $filesToHash = Get-ChildItem -Path ".\publish_output\*64*.*" & "$env:build_location\python\python.exe" -c "import sys;from wppm import hash; hash.print_hashes(sys.argv[1:])" @($filesToHash.FullName) | Out-File -FilePath $DESTFILE gc $DESTFILE - + - name: Upload WinPython folder as artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.flavor_config.ARTIFACT_NAME }} path: publish_output - retention-days: 66 # keeps artifact for 30 days \ No newline at end of file + retention-days: 66 # keeps artifact for 66 days diff --git a/.github/workflows/github_workflows_build-all_3.14.yml b/.github/workflows/github_workflows_build-all_3.14.yml index c868d6e1..1b764040 100644 --- a/.github/workflows/github_workflows_build-all_3.14.yml +++ b/.github/workflows/github_workflows_build-all_3.14.yml @@ -39,7 +39,7 @@ jobs: ZIP: "1" SEVEN_Z: "0" EXE: "1" - PANDOC: "1" + PANDOC: "0" ARTIFACT_NAME: "publish_314freec" python_sourcef: "https://github.com/winpython/winpy.github.io/releases/download/20250825/cpython-3.14.0rc2+20250825-x86_64-pc-windows-msvc-freethreaded-install_only_stripped.tar.gz" python_sha256f: "dda491993214ae78948297848aa9d75d1d10762c33ff16487793ca5205516e4a" From 1031c0d40689987869e8efe9527fbd134ae4af75 Mon Sep 17 00:00:00 2001 From: stonebig Date: Sun, 24 Aug 2025 20:11:55 +0200 Subject: [PATCH 2/2] align 3.13 build to 3.14 practice --- .../github_workflows_build-all_3.13.yml | 118 ++++++++++++++++-- 1 file changed, 106 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github_workflows_build-all_3.13.yml b/.github/workflows/github_workflows_build-all_3.13.yml index 3469dad7..fba70625 100644 --- a/.github/workflows/github_workflows_build-all_3.13.yml +++ b/.github/workflows/github_workflows_build-all_3.13.yml @@ -2,6 +2,8 @@ name: Build WinPython Distribution for 3.13 # matrix allows to avoid duplicated code in github_workflows_build-dot, github_workflows_build-whl, github_workflows_build-slim # 2025-08-23a: merged code proposed per Gemini 2.5 flash, it corrected also PYTHONIOENCODING="utf-8" error # 2025-08-23b: moved manually to Python-3.13.7 +# 2025-08-25a: will use manual uploaded free-threading, as astral doesn't provide +# 2025-08-25b: move up all parameters on: workflow_dispatch: @@ -21,7 +23,16 @@ jobs: ZIP: "1" SEVEN_Z: "0" EXE: "1" + PANDOC: "0" ARTIFACT_NAME: "publish_313dotc" + 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" + python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33" + WINPYARCH: "64" + WINPYVERSION: "313" + WINPYVER2: "3.13.7.0" + my_release_level: "b3" + build_location: "WPy64-3170b3" + # WinPython Slim configuration - FLAVOR: "slimc" REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0slimb3.txt" @@ -29,7 +40,16 @@ jobs: ZIP: "0" SEVEN_Z: "1" EXE: "1" + PANDOC: "1" ARTIFACT_NAME: "publish_313slimc" + 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" + python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33" + WINPYARCH: "64" + WINPYVERSION: "313" + WINPYVER2: "3.13.7.0" + my_release_level: "b3" + build_location: "WPy64-3170b3" + # WinPython Whl configuration - FLAVOR: "whlc" REQUIREMENTS: "winpython\\portable\\cycle_2025_04\\requir.64-3_13_7_0dotb3.txt" # Note: Original whl used dotb3 requirements, verify if this is intended @@ -37,7 +57,15 @@ jobs: ZIP: "0" SEVEN_Z: "1" EXE: "0" + PANDOC: "0" ARTIFACT_NAME: "publish_313whlc" + 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" + python_sha256f: "d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33" + WINPYARCH: "64" + WINPYVERSION: "313" + WINPYVER2: "3.13.7.0" + my_release_level: "b3" + build_location: "WPy64-3170b3" steps: - name: Checkout repository @@ -46,16 +74,15 @@ jobs: - name: Set static variables and Python version shell: bash run: | - echo "WINPYARCH=64" >> $GITHUB_ENV - echo "WINPYVERSION=313" >> $GITHUB_ENV - - #3.13.7 as the base for now (3.13.6 was skipped) - # Gemini says: can update this section to dynamically select Python versions based on matrix if needed. - 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 - echo "python_sha256=d60173a7693c3134b8364814b80f98ddde0638e0e75e5b004f37452fccf67a33" >> $GITHUB_ENV - echo "build_location=WPy64-31370b3" >> $GITHUB_ENV - echo "WINPYVER=3.13.7.0${{ matrix.flavor_config.FLAVOR }}b3" >> $GITHUB_ENV - echo "WINPYVER2=3.13.7.0" >> $GITHUB_ENV + # Set matrix-specific variables + echo "WINPYARCH=${{ matrix.flavor_config.WINPYARCH }}" >> $GITHUB_ENV + echo "WINPYVERSION=${{ matrix.flavor_config.WINPYVERSION }}" >> $GITHUB_ENV + + echo "build_location=${{ matrix.flavor_config.build_location }}" >> $GITHUB_ENV + + echo "WINPYVER2=${{ matrix.flavor_config.WINPYVER2 }}" >> $GITHUB_ENV + echo "my_release_level=${{ matrix.flavor_config.my_release_level }}" >> $GITHUB_ENV + echo "WINPYVER=${{ matrix.flavor_config.WINPYVER2 }}${{ matrix.flavor_config.FLAVOR }}${{ matrix.flavor_config.my_release_level }}" >> $GITHUB_ENV # Set matrix-specific variables echo "WINPYFLAVOR=${{ matrix.flavor_config.FLAVOR }}" >> $GITHUB_ENV @@ -65,11 +92,19 @@ jobs: echo "WINPY7Z=${{ matrix.flavor_config.SEVEN_Z }}" >> $GITHUB_ENV echo "WINPYEXE=${{ matrix.flavor_config.EXE }}" >> $GITHUB_ENV + echo "python_sourcef=${{ matrix.flavor_config.python_sourcef }}" >> $GITHUB_ENV + echo "python_sha256f=${{ matrix.flavor_config.python_sha256f }}" >> $GITHUB_ENV + + echo "pandoc_source=https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-windows-x86_64.zip" >> $GITHUB_ENV + echo "pandoc_sha256=11eb6dbe5286c9e5edb0cca4412e7d99ec6578ec04158b0b7fe11f7fd96688e5" >> $GITHUB_ENV + - name: See variables shell: pwsh run: | Write-Output "WINPYVERSION is $env:WINPYVERSION" Write-Output "WINPYFLAVOR is $env:WINPYFLAVOR" + Write-Output "python_sourcef is $env:python_sourcef" + Write-Output "python_sha256f is $env:python_sha256f" Write-Output "python_source is $env:python_source" Write-Output "python_sha256 is $env:python_sha256" Write-Output "WINPYrequirements is $env:WINPYrequirements" @@ -84,10 +119,11 @@ jobs: - name: Download python-3 standalone shell: pwsh run: | - curl.exe -L -o "python-3-embed.tar.gz" $env:python_source + Write-Output "python_sourcef used is $env:python_sourcef" + curl.exe -L -o "python-3-embed.tar.gz" $env:python_sourcef # Calculate SHA256 hash $filePath = "python-3-embed.tar.gz" - $expectedHash = $env:python_sha256 + $expectedHash = $env:python_sha256f $hashObject = Get-FileHash -Path $filePath -Algorithm SHA256 $actualHash = $hashObject.Hash.ToLower() @@ -124,6 +160,64 @@ jobs: New-Item -ItemType Directory -Path $env:build_location Get-ChildItem -Path dotpython -Force | Move-Item -Destination $env:build_location -Force + - name: Download and integrate pandoc binary + shell: pwsh + if: ${{ matrix.flavor_config.PANDOC == '1' }} + run: | + # Define the URL for the Pandoc binary and the target path + $pandocUrl = "https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-windows-x86_64.zip" + $pandocZipPath = "pandoc.zip" + $tempDir = "pandoc_temp" + $targetDir = "$env:build_location\t" + + # Download the zip file + Write-Host "Downloading Pandoc from $env:pandoc_source" + curl.exe -L -o $pandocZipPath $env:pandoc_source + + # Create a temporary directory for extraction + Write-Host "Creating temporary directory for extraction" + mkdir -p $tempDir + + # Unzip the contents to the temporary directory + Write-Host "Extracting archive to temporary directory" + Expand-Archive -Path $pandocZipPath -DestinationPath $tempDir + + # Create the final target directory + Write-Host "Creating final target directory: $targetDir" + if (-not (Test-Path -Path $targetDir)) { + mkdir -p $targetDir + } + + # Find and copy only the pandoc.exe file + Write-Host "Copying pandoc.exe to $targetDir" + Copy-Item -Path (Join-Path $tempDir "pandoc-3.1.9\pandoc.exe") -Destination $targetDir -Force + + # Optional: Verify the contents + Write-Host "Listing contents of $targetDir" + Get-ChildItem -Path $targetDir + + # Calculate SHA256 hash + $filePath = $pandocZipPath + $expectedHash = $env:pandoc_sha256 + + $hashObject = Get-FileHash -Path $filePath -Algorithm SHA256 + $actualHash = $hashObject.Hash.ToLower() + + if ($actualHash -eq $expectedHash.ToLower()) { + Write-Output "Hash matches." + } else { + Write-Output "Hash does NOT match." + Write-Output "Actual: $actualHash" + Write-Output "Expected: $expectedHash" + exit 1 + } + + # Optional: Clean up temporary files + Write-Host "Cleaning up temporary files..." + Remove-Item -Path $tempDir -Recurse -Force + Remove-Item -Path $pandocZipPath -Force + + - name: Upgrade pip and patch launchers shell: pwsh run: |