@@ -238,12 +238,15 @@ jobs:
238238
239239 # Update RECORD file (required for valid wheel)
240240 cd wheel-contents
241+ # Dynamically find dist-info folder
242+ DIST_INFO=$(ls -d pygpukit-*.dist-info | head -1)
243+ echo "Found dist-info folder: $DIST_INFO"
241244 find pygpukit -type f | while read f; do
242245 hash=$(python -c "import hashlib, base64; print('sha256=' + base64.urlsafe_b64encode(hashlib.sha256(open('$f', 'rb').read()).digest()).rstrip(b'=').decode())")
243246 size=$(stat -c%s "$f")
244247 echo "$f,$hash,$size"
245- done > pygpukit-0.2.11.dist-info /RECORD
246- echo "pygpukit-0.2.11.dist-info /RECORD,," >> pygpukit-0.2.11.dist-info /RECORD
248+ done > "$DIST_INFO /RECORD"
249+ echo "$DIST_INFO /RECORD,," >> "$DIST_INFO /RECORD"
247250
248251 # Repack wheel
249252 cd ..
@@ -550,7 +553,11 @@ jobs:
550553 Get-ChildItem wheel-contents/pygpukit/
551554
552555 # Update RECORD file (required for valid wheel)
553- $recordPath = "wheel-contents/pygpukit-0.2.11.dist-info/RECORD"
556+ # Dynamically find dist-info folder
557+ $distInfo = Get-ChildItem wheel-contents -Directory -Filter "pygpukit-*.dist-info" | Select-Object -First 1
558+ $distInfoName = $distInfo.Name
559+ Write-Host "Found dist-info folder: $distInfoName"
560+ $recordPath = "wheel-contents/$distInfoName/RECORD"
554561 $newRecord = @()
555562 Get-ChildItem wheel-contents/pygpukit -File | ForEach-Object {
556563 $relativePath = "pygpukit/$($_.Name)"
@@ -561,15 +568,15 @@ jobs:
561568 $newRecord += "$relativePath,sha256=$hashB64,$size"
562569 }
563570 # Add dist-info files
564- Get-ChildItem "wheel-contents/pygpukit-0.2.11.dist-info " -File | Where-Object { $_.Name -ne "RECORD" } | ForEach-Object {
565- $relativePath = "pygpukit-0.2.11.dist-info /$($_.Name)"
571+ Get-ChildItem "wheel-contents/$distInfoName " -File | Where-Object { $_.Name -ne "RECORD" } | ForEach-Object {
572+ $relativePath = "$distInfoName /$($_.Name)"
566573 $bytes = [System.IO.File]::ReadAllBytes($_.FullName)
567574 $hash = [System.Security.Cryptography.SHA256]::Create().ComputeHash($bytes)
568575 $hashB64 = [Convert]::ToBase64String($hash).TrimEnd('=').Replace('+', '-').Replace('/', '_')
569576 $size = $_.Length
570577 $newRecord += "$relativePath,sha256=$hashB64,$size"
571578 }
572- $newRecord += "pygpukit-0.2.11.dist-info /RECORD,,"
579+ $newRecord += "$distInfoName /RECORD,,"
573580 $newRecord | Out-File -FilePath $recordPath -Encoding utf8NoBOM
574581
575582 # Repack wheel
0 commit comments