sys.platform android & ios (#5921)

* Make sys.platform to return 'android'

* Added missing 'ios' platform
This commit is contained in:
Shahar Naveh authored and GitHub committed 2025-07-10 00:47:24 +09:00
1 parent 3a6a766a03
commit 5985ec8be0
1 file changed
+5 -2
+5 -2
View File
@@ -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")] {