File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed
Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 66// so build.rs sets this env var
77pub const LIB_PATH : & str = match option_env ! ( "win_lib_path" ) {
88 Some ( s) => s,
9- None => concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/../ Lib" ) ,
9+ None => concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/Lib" ) ,
1010} ;
1111
1212#[ cfg( feature = "freeze-stdlib" ) ]
1313pub fn frozen_stdlib ( ) -> impl Iterator < Item = ( String , rustpython_compiler_core:: FrozenModule ) > {
14- rustpython_derive:: py_freeze!( dir = ".. /Lib" , crate_name = "rustpython_compiler_core" )
14+ rustpython_derive:: py_freeze!( dir = "./Lib" , crate_name = "rustpython_compiler_core" )
1515}
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ extern crate env_logger;
4343#[ macro_use]
4444extern crate log;
4545
46+ use rustpython_pylib;
47+
4648mod shell;
4749
4850use clap:: { App , AppSettings , Arg , ArgMatches } ;
@@ -257,25 +259,24 @@ fn add_stdlib(vm: &mut VirtualMachine) {
257259 {
258260 use rustpython_vm:: common:: rc:: PyRc ;
259261 let state = PyRc :: get_mut ( & mut vm. state ) . unwrap ( ) ;
262+ let settings = & mut state. settings ;
260263
261264 #[ allow( clippy:: needless_collect) ] // false positive
262- let path_list: Vec < _ > = state . settings . path_list . drain ( ..) . collect ( ) ;
265+ let path_list: Vec < _ > = settings. path_list . drain ( ..) . collect ( ) ;
263266
264267 // BUILDTIME_RUSTPYTHONPATH should be set when distributing
265268 if let Some ( paths) = option_env ! ( "BUILDTIME_RUSTPYTHONPATH" ) {
266- state
267- . settings
269+ settings
268270 . path_list
269271 . extend ( split_paths ( paths) . map ( |path| path. into_os_string ( ) . into_string ( ) . unwrap ( ) ) )
270272 } else {
271273 #[ cfg( feature = "rustpython-pylib" ) ]
272- state
273- . settings
274+ settings
274275 . path_list
275276 . push ( rustpython_pylib:: LIB_PATH . to_owned ( ) )
276277 }
277278
278- state . settings . path_list . extend ( path_list. into_iter ( ) ) ;
279+ settings. path_list . extend ( path_list. into_iter ( ) ) ;
279280 }
280281}
281282
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ edition = "2021"
1111crate-type = [" cdylib" , " rlib" ]
1212
1313[features ]
14- default = [" stdlib" ]
15- stdlib = [" freeze-stdlib" , " rustpython-pylib" , " rustpython-stdlib" ]
16- freeze-stdlib = [" rustpython-vm/freeze-stdlib" , " rustpython-pylib?/freeze-stdlib" ]
14+ default = [" freeze-stdlib" ]
15+ freeze-stdlib = [" rustpython-vm/freeze-stdlib" , " rustpython-pylib/freeze-stdlib" , " rustpython-stdlib" ]
1716no-start-func = []
1817
1918[dependencies ]
You can’t perform that action at this time.
0 commit comments