From 50252b4e809f7277670b284d168157299572fd87 Mon Sep 17 00:00:00 2001 From: coolreader18 <33094578+coolreader18@users.noreply.github.com> Date: Fri, 7 Jun 2019 11:50:15 -0500 Subject: [PATCH] Disable the pwd module on android --- vm/Cargo.toml | 2 +- vm/src/stdlib/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vm/Cargo.toml b/vm/Cargo.toml index ddc8ee20c..922163d01 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -38,5 +38,5 @@ bincode = "1.1.4" git = "https://github.com/OddCoincidence/unicode-casing" rev = "90d6d1f02b9cc04ffb55a5f1c3fa1455a84231fb" -[target.'cfg(unix)'.dependencies] +[target.'cfg(all(unix, not(target_os = "android")))'.dependencies] pwd = "1" diff --git a/vm/src/stdlib/mod.rs b/vm/src/stdlib/mod.rs index 096d14845..7c72a1b61 100644 --- a/vm/src/stdlib/mod.rs +++ b/vm/src/stdlib/mod.rs @@ -26,7 +26,7 @@ use crate::vm::VirtualMachine; pub mod io; #[cfg(not(target_arch = "wasm32"))] mod os; -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "android")))] mod pwd; use crate::pyobject::PyObjectRef; @@ -67,7 +67,7 @@ pub fn get_module_inits() -> HashMap { } // Unix-only - #[cfg(unix)] + #[cfg(all(unix, not(target_os = "android")))] { modules.insert("pwd".to_string(), Box::new(pwd::make_module)); }