We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sys.platform
1 parent 3a6a766 commit 5985ec8Copy full SHA for 5985ec8
vm/src/stdlib/sys.rs
@@ -67,11 +67,14 @@ mod sys {
67
#[pyattr(name = "platform")]
68
pub(crate) const PLATFORM: &str = {
69
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
+ if #[cfg(target_os = "linux")] {
72
"linux"
+ } else if #[cfg(target_os = "android")] {
73
+ "android"
74
} else if #[cfg(target_os = "macos")] {
75
"darwin"
76
+ } else if #[cfg(target_os = "ios")] {
77
+ "ios"
78
} else if #[cfg(windows)] {
79
"win32"
80
} else if #[cfg(target_os = "wasi")] {
0 commit comments