mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
sys.platform android & ios (#5921)
* Make sys.platform to return 'android' * Added missing 'ios' platform
This commit is contained in:
1 parent
3a6a766a03
commit
5985ec8be0
1 file changed
+5
-2
@@ -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")] {
|
||||
|
||||
Reference in new issue
Block a user