From 5985ec8be0069ea84d681beadc09e220b1eb3388 Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:47:24 +0300 Subject: [PATCH] `sys.platform` android & ios (#5921) * Make sys.platform to return 'android' * Added missing 'ios' platform --- vm/src/stdlib/sys.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/src/stdlib/sys.rs b/vm/src/stdlib/sys.rs index fbd6f0de8..4a4d60ef2 100644 --- a/vm/src/stdlib/sys.rs +++ b/vm/src/stdlib/sys.rs @@ -67,11 +67,14 @@ mod sys { #[pyattr(name = "platform")] pub(crate) const PLATFORM: &str = { cfg_if::cfg_if! { - if #[cfg(any(target_os = "linux", target_os = "android"))] { - // Android is linux as well. see https://bugs.python.org/issue32637 + if #[cfg(target_os = "linux")] { "linux" + } else if #[cfg(target_os = "android")] { + "android" } else if #[cfg(target_os = "macos")] { "darwin" + } else if #[cfg(target_os = "ios")] { + "ios" } else if #[cfg(windows)] { "win32" } else if #[cfg(target_os = "wasi")] {