Skip to content

Commit

Permalink
Update riscv64 Python downloads to allow install on riscv64gc (#1…
Browse files Browse the repository at this point in the history
…0937)

Closes #10883
  • Loading branch information
zanieb authored Jan 24, 2025
1 parent 98e7cd0 commit eeab865
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 8 additions & 8 deletions crates/uv-python/src/downloads.inc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: Some(Prerelease { kind: PrereleaseKind::Alpha, number: 4 }),
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -376,7 +376,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: Some(Prerelease { kind: PrereleaseKind::Alpha, number: 4 }),
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -1024,7 +1024,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -1348,7 +1348,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -2752,7 +2752,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -5416,7 +5416,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -8260,7 +8260,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down Expand Up @@ -12202,7 +12202,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
prerelease: None,
implementation: LenientImplementationName::Known(ImplementationName::CPython),
arch: Arch{
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64),
family: target_lexicon::Architecture::Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc),
variant: None,
},
os: Os(target_lexicon::OperatingSystem::Linux),
Expand Down
5 changes: 4 additions & 1 deletion crates/uv-python/template-download-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def prepare_arch(arch: dict) -> tuple[str, str]:
case "armv7":
family = "Arm(target_lexicon::ArmArchitecture::Armv7)"
case "riscv64":
family = "Riscv64(target_lexicon::Riscv64Architecture::Riscv64)"
# The `gc` variant of riscv64 is the common base instruction set and
# is the target in `python-build-standalone`
# See https://github.com/astral-sh/python-build-standalone/issues/504
family = "Riscv64(target_lexicon::Riscv64Architecture::Riscv64gc)"
case value:
family = value.capitalize()
variant = (
Expand Down

0 comments on commit eeab865

Please sign in to comment.