MCPcopy Index your code
hub / github.com/RustPython/RustPython / collect_stdlib_paths

Function collect_stdlib_paths

src/interpreter.rs:60–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58/// Collect standard library paths from build-time configuration
59#[cfg(all(feature = "stdlib", not(feature = "freeze-stdlib")))]
60fn collect_stdlib_paths() -> Vec<String> {
61 // BUILDTIME_RUSTPYTHONPATH should be set when distributing
62 if let Some(paths) = option_env!("BUILDTIME_RUSTPYTHONPATH") {
63 crate::settings::split_paths(paths)
64 .map(|path| path.into_os_string().into_string().unwrap())
65 .collect()
66 } else {
67 #[cfg(feature = "rustpython-pylib")]
68 {
69 vec![rustpython_pylib::LIB_PATH.to_owned()]
70 }
71 #[cfg(not(feature = "rustpython-pylib"))]
72 {
73 vec![]
74 }
75 }
76}

Callers 1

setup_dynamic_stdlibFunction · 0.85

Calls 5

split_pathsFunction · 0.85
collectMethod · 0.80
into_stringMethod · 0.80
mapMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected