Fix pyimport bug

This commit is contained in:
Shunsuke Shibayama 2022-10-13 00:23:14 +09:00
parent a2aa38ac25
commit fe339a7dc7
7 changed files with 36 additions and 6 deletions

View file

@ -5,6 +5,19 @@ use std::process::Command;
use crate::serialize::get_magic_num_from_bytes;
pub const BUILTIN_PYTHON_MODS: [&str; 10] = [
"glob",
"importlib",
"io",
"math",
"re",
"random",
"socket",
"sys",
"time",
"urllib",
];
pub fn which_python() -> String {
let (cmd, python) = if cfg!(windows) {
("where", "python")