File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 6
6
// so build.rs sets this env var
7
7
pub const LIB_PATH : & str = match option_env ! ( "win_lib_path" ) {
8
8
Some ( s) => s,
9
- None => concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/../ Lib" ) ,
9
+ None => concat ! ( env!( "CARGO_MANIFEST_DIR" ) , "/Lib" ) ,
10
10
} ;
11
11
12
12
#[ cfg( feature = "freeze-stdlib" ) ]
13
13
pub 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" )
15
15
}
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ extern crate env_logger;
43
43
#[ macro_use]
44
44
extern crate log;
45
45
46
+ use rustpython_pylib;
47
+
46
48
mod shell;
47
49
48
50
use clap:: { App , AppSettings , Arg , ArgMatches } ;
@@ -257,25 +259,24 @@ fn add_stdlib(vm: &mut VirtualMachine) {
257
259
{
258
260
use rustpython_vm:: common:: rc:: PyRc ;
259
261
let state = PyRc :: get_mut ( & mut vm. state ) . unwrap ( ) ;
262
+ let settings = & mut state. settings ;
260
263
261
264
#[ 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 ( ) ;
263
266
264
267
// BUILDTIME_RUSTPYTHONPATH should be set when distributing
265
268
if let Some ( paths) = option_env ! ( "BUILDTIME_RUSTPYTHONPATH" ) {
266
- state
267
- . settings
269
+ settings
268
270
. path_list
269
271
. extend ( split_paths ( paths) . map ( |path| path. into_os_string ( ) . into_string ( ) . unwrap ( ) ) )
270
272
} else {
271
273
#[ cfg( feature = "rustpython-pylib" ) ]
272
- state
273
- . settings
274
+ settings
274
275
. path_list
275
276
. push ( rustpython_pylib:: LIB_PATH . to_owned ( ) )
276
277
}
277
278
278
- state . settings . path_list . extend ( path_list. into_iter ( ) ) ;
279
+ settings. path_list . extend ( path_list. into_iter ( ) ) ;
279
280
}
280
281
}
281
282
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ edition = "2021"
11
11
crate-type = [" cdylib" , " rlib" ]
12
12
13
13
[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" ]
17
16
no-start-func = []
18
17
19
18
[dependencies ]
You can’t perform that action at this time.
0 commit comments