Skip to content

Commit 5985ec8

Browse files
authored
sys.platform android & ios (#5921)
* Make sys.platform to return 'android' * Added missing 'ios' platform
1 parent 3a6a766 commit 5985ec8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vm/src/stdlib/sys.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ mod sys {
6767
#[pyattr(name = "platform")]
6868
pub(crate) const PLATFORM: &str = {
6969
cfg_if::cfg_if! {
70-
if #[cfg(any(target_os = "linux", target_os = "android"))] {
71-
// Android is linux as well. see https://bugs.python.org/issue32637
70+
if #[cfg(target_os = "linux")] {
7271
"linux"
72+
} else if #[cfg(target_os = "android")] {
73+
"android"
7374
} else if #[cfg(target_os = "macos")] {
7475
"darwin"
76+
} else if #[cfg(target_os = "ios")] {
77+
"ios"
7578
} else if #[cfg(windows)] {
7679
"win32"
7780
} else if #[cfg(target_os = "wasi")] {

0 commit comments

Comments
 (0)