mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Add sys.platlibdir
This commit is contained in:
1 file changed
+2
@@ -655,6 +655,7 @@ settrace() -- set the global debug tracing function
|
||||
let base_prefix = option_env!("RUSTPYTHON_BASEPREFIX").unwrap_or(prefix);
|
||||
let exec_prefix = option_env!("RUSTPYTHON_EXECPREFIX").unwrap_or(prefix);
|
||||
let base_exec_prefix = option_env!("RUSTPYTHON_BASEEXECPREFIX").unwrap_or(exec_prefix);
|
||||
let platlibdir = option_env!("RUSTPYTHON_PLATLIBDIR").unwrap_or("lib");
|
||||
|
||||
extend_module!(vm, module, {
|
||||
"__name__" => ctx.new_ascii_literal(ascii!("sys")),
|
||||
@@ -702,6 +703,7 @@ settrace() -- set the global debug tracing function
|
||||
"base_prefix" => ctx.new_utf8_str(base_prefix),
|
||||
"exec_prefix" => ctx.new_utf8_str(exec_prefix),
|
||||
"base_exec_prefix" => ctx.new_utf8_str(base_exec_prefix),
|
||||
"platlibdir" => ctx.new_utf8_str(platlibdir),
|
||||
"exit" => named_function!(ctx, sys, exit),
|
||||
"abiflags" => ctx.new_utf8_str(ABIFLAGS.to_owned()),
|
||||
"audit" => named_function!(ctx, sys, audit),
|
||||
|
||||
Reference in new issue
Block a user