Skip to content

Commit 9563bbd

Browse files
Apply upstream cpython patch to fix test_bz2 on 3.15.0a6 (Ubuntu-22.04 arm64) (#381)
* patch for 3.15.0a6 * patch for 3.15.0a6
1 parent 8cf18c1 commit 9563bbd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

builders/nix-python-builder.psm1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ class NixPythonBuilder : PythonBuilder {
146146
$sourcesLocation = $this.Download()
147147

148148
Push-Location -Path $sourcesLocation
149+
150+
# Patch for 3.15.0a6: Fix test_bz2 BIG_DATA to ensure two compressed blocks
151+
# See: https://github.com/python/cpython/pull/145730
152+
if (($this.Architecture -match "arm64") -and ($this.Platform -match "22\.04") -and ($this.Version -eq [semver]"3.15.0-alpha.6")) {
153+
Write-Host "Applying patch for python/cpython#145730 (test_bz2 fix)..."
154+
Execute-Command -Command "curl -sL -o Lib/test/test_bz2.py https://raw.githubusercontent.com/python/cpython/19676e5fc28bdee8325a062a31ddeee60960cf75/Lib/test/test_bz2.py"
155+
}
156+
149157
Write-Host "Configure for $($this.Platform)..."
150158
$this.Configure()
151159

0 commit comments

Comments
 (0)