Calculate stdlib_dir (sys._stdlib_dir) Returns None if the stdlib directory doesn't exist
(prefix: &str)
| 307 | /// Calculate stdlib_dir (sys._stdlib_dir) |
| 308 | /// Returns None if the stdlib directory doesn't exist |
| 309 | fn calculate_stdlib_dir(prefix: &str) -> Option<String> { |
| 310 | #[cfg(not(windows))] |
| 311 | let stdlib_dir = PathBuf::from(prefix).join(platform::stdlib_subdir()); |
| 312 | |
| 313 | #[cfg(windows)] |
| 314 | let stdlib_dir = PathBuf::from(prefix).join(platform::STDLIB_SUBDIR); |
| 315 | |
| 316 | if stdlib_dir.is_dir() { |
| 317 | Some(stdlib_dir.to_string_lossy().into_owned()) |
| 318 | } else { |
| 319 | None |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | /// Build the complete module_search_paths (sys.path) |
| 324 | fn build_module_search_paths(settings: &Settings, prefix: &str, exec_prefix: &str) -> Vec<String> { |
no test coverage detected