Skip to content

Commit 7e21880

Browse files
committed
fix(providers): update Python and Ruby download sources and URLs
Python: - Switch from indygreg to astral-sh/python-build-standalone - Use release 20251031 which has Python 3.11.14, 3.12.12 Ruby: - Fix asset naming patterns for ruby-builder - Ubuntu x64: no arch suffix, arm64: has -arm64 suffix - macOS x64: uses macos-latest, arm64: uses macos-13-arm64 Integration tests: - Python: Use 3.11.14 and 3.12.12 (available in 20251031) - Ruby: Use 3.3.6 and 3.4.1 consistently across all platforms
1 parent 65857c3 commit 7e21880

4 files changed

Lines changed: 41 additions & 33 deletions

File tree

.github/workflows/integration-test-python.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ jobs:
4040
- os: ubuntu-latest
4141
platform: linux
4242
ext: ""
43-
# Use Python versions available in python-build-standalone for Linux
44-
version1: "3.11.11"
45-
version2: "3.12.8"
43+
# Use Python versions available in astral-sh/python-build-standalone release 20251031
44+
version1: "3.11.14"
45+
version2: "3.12.12"
4646
- os: macos-latest
4747
platform: macos
4848
ext: ""
49-
version1: "3.11.11"
50-
version2: "3.12.8"
49+
version1: "3.11.14"
50+
version2: "3.12.12"
5151
- os: windows-latest
5252
platform: windows
5353
ext: ".exe"
54-
version1: "3.11.11"
55-
version2: "3.12.8"
54+
version1: "3.11.14"
55+
version2: "3.12.12"
5656
env:
5757
# Run tests from a directory outside the repo to avoid picking up .dtvem/runtimes.json
5858
TEST_WORKSPACE: ${{ github.workspace }}/../dtvem-test-workspace

.github/workflows/integration-test-ruby.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
- os: ubuntu-latest
4141
platform: linux
4242
ext: ""
43-
# Ubuntu uses older Ruby versions available in ruby-builder for ubuntu-22.04
44-
version1: "3.2.2"
45-
version2: "3.2.3"
43+
# Use Ruby versions available in ruby/ruby-builder toolcache release
44+
version1: "3.3.6"
45+
version2: "3.4.1"
4646
- os: macos-latest
4747
platform: macos
4848
ext: ""

src/runtimes/python/provider.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,18 +259,18 @@ func (p *Provider) getStandaloneBuildURL(version, platform, arch string) (string
259259
}
260260

261261
// python-build-standalone uses a build date in the version
262-
// We need to find the latest build for the requested Python version
263-
// For now, we'll use a known stable build date: 20241016
264-
buildDate := "20241016"
262+
// The project moved from indygreg to astral-sh
263+
// Using a recent build date that includes Python 3.10, 3.11, 3.12, 3.13
264+
buildDate := "20251031"
265265

266266
// Construct archive name
267-
// Format: cpython-3.11.0+20241016-x86_64-unknown-linux-gnu-install_only.tar.gz
267+
// Format: cpython-3.11.0+20251031-x86_64-unknown-linux-gnu-install_only.tar.gz
268268
archiveName := fmt.Sprintf("cpython-%s+%s-%s-%s-install_only.tar.gz",
269269
version, buildDate, pbsArch, pbsPlatform)
270270

271271
// Construct download URL
272-
// https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-...tar.gz
273-
downloadURL := fmt.Sprintf("https://github.com/indygreg/python-build-standalone/releases/download/%s/%s",
272+
// https://github.com/astral-sh/python-build-standalone/releases/download/20251031/cpython-...tar.gz
273+
downloadURL := fmt.Sprintf("https://github.com/astral-sh/python-build-standalone/releases/download/%s/%s",
274274
buildDate, archiveName)
275275

276276
return downloadURL, archiveName, nil

src/runtimes/ruby/provider.go

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -255,32 +255,40 @@ func (p *Provider) getRubyInstallerURL(version, arch string) (string, string, er
255255
func (p *Provider) getRubyBuildURL(version, platform, arch string) (string, string, error) {
256256
// Use ruby-builder releases from ruby/ruby-builder (GitHub Actions)
257257
// These provide prebuilt Ruby binaries
258+
//
259+
// Naming patterns:
260+
// - Ubuntu x64: ruby-X.X.X-ubuntu-22.04.tar.gz (no arch suffix)
261+
// - Ubuntu arm64: ruby-X.X.X-ubuntu-22.04-arm64.tar.gz
262+
// - macOS x64: ruby-X.X.X-macos-latest.tar.gz (no arch suffix)
263+
// - macOS arm64: ruby-X.X.X-macos-13-arm64.tar.gz
258264

259-
var rbsArch string
260-
switch arch {
261-
case constants.ArchAMD64:
262-
rbsArch = "x64"
263-
case constants.ArchARM64:
264-
rbsArch = "arm64"
265-
default:
266-
return "", "", fmt.Errorf("unsupported architecture for %s: %s", platform, arch)
267-
}
265+
var archiveName string
268266

269-
var rbsPlatform string
270267
switch platform {
271268
case constants.OSDarwin:
272-
// Format: ruby-3.4.7-macos-arm64.tar.gz or ruby-3.4.7-macos-13-arm64.tar.gz
273-
rbsPlatform = "macos"
269+
if arch == constants.ArchARM64 {
270+
// macOS arm64: ruby-3.3.6-macos-13-arm64.tar.gz
271+
archiveName = fmt.Sprintf("ruby-%s-macos-13-arm64.tar.gz", version)
272+
} else if arch == constants.ArchAMD64 {
273+
// macOS x64: ruby-3.3.6-macos-latest.tar.gz
274+
archiveName = fmt.Sprintf("ruby-%s-macos-latest.tar.gz", version)
275+
} else {
276+
return "", "", fmt.Errorf("unsupported architecture for %s: %s", platform, arch)
277+
}
274278
case constants.OSLinux:
275-
// Format: ruby-3.4.7-ubuntu-22.04-x64.tar.gz
276-
rbsPlatform = "ubuntu-22.04"
279+
if arch == constants.ArchARM64 {
280+
// Ubuntu arm64: ruby-3.3.6-ubuntu-22.04-arm64.tar.gz
281+
archiveName = fmt.Sprintf("ruby-%s-ubuntu-22.04-arm64.tar.gz", version)
282+
} else if arch == constants.ArchAMD64 {
283+
// Ubuntu x64: ruby-3.3.6-ubuntu-22.04.tar.gz (no arch suffix)
284+
archiveName = fmt.Sprintf("ruby-%s-ubuntu-22.04.tar.gz", version)
285+
} else {
286+
return "", "", fmt.Errorf("unsupported architecture for %s: %s", platform, arch)
287+
}
277288
default:
278289
return "", "", fmt.Errorf("unsupported platform: %s", platform)
279290
}
280291

281-
// Format: ruby-3.4.7-macos-arm64.tar.gz or ruby-3.4.7-ubuntu-22.04-x64.tar.gz
282-
archiveName := fmt.Sprintf("ruby-%s-%s-%s.tar.gz", version, rbsPlatform, rbsArch)
283-
284292
// Download from ruby-builder releases using toolcache tag
285293
downloadURL := fmt.Sprintf("https://github.com/ruby/ruby-builder/releases/download/toolcache/%s", archiveName)
286294

0 commit comments

Comments
 (0)