Skip to content

Commit 5eac229

Browse files
authored
Move pylib -> crates/pylib (RustPython#6225)
* Move `pylib * clean `build.rs` a bit
1 parent 609d99f commit 5eac229

File tree

7 files changed

+8
-7
lines changed

7 files changed

+8
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ members = [
131131
"jit",
132132
"vm",
133133
"vm/sre_engine",
134-
"pylib",
135134
"stdlib",
136135
"derive-impl",
137136
"wtf8",
@@ -157,7 +156,7 @@ rustpython-derive-impl = { path = "derive-impl", version = "0.4.0" }
157156
rustpython-jit = { path = "jit", version = "0.4.0" }
158157
rustpython-literal = { path = "compiler/literal", version = "0.4.0" }
159158
rustpython-vm = { path = "vm", default-features = false, version = "0.4.0" }
160-
rustpython-pylib = { path = "pylib", version = "0.4.0" }
159+
rustpython-pylib = { path = "crates/pylib", version = "0.4.0" }
161160
rustpython-stdlib = { path = "stdlib", default-features = false, version = "0.4.0" }
162161
rustpython-sre_engine = { path = "vm/sre_engine", version = "0.4.0" }
163162
rustpython-wtf8 = { path = "wtf8", version = "0.4.0" }

crates/pylib/Lib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../Lib/

pylib/build.rs renamed to crates/pylib/build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
const CRATE_ROOT: &str = "../..";
2+
13
fn main() {
2-
process_python_libs("../vm/Lib/python_builtins/*");
4+
process_python_libs(format!("{CRATE_ROOT}/vm/Lib/python_builtins/*").as_str());
5+
process_python_libs(format!("{CRATE_ROOT}/vm/Lib/core_modules/*").as_str());
36

4-
process_python_libs("../vm/Lib/core_modules/*");
57
#[cfg(feature = "freeze-stdlib")]
68
if cfg!(windows) {
7-
process_python_libs("../Lib/**/*");
9+
process_python_libs(format!("{CRATE_ROOT}/Lib/**/*").as_str());
810
} else {
911
process_python_libs("./Lib/**/*");
1012
}

example_projects/frozen_stdlib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2021"
66
[dependencies]
77
rustpython = { path = "../../", default-features = false, features = ["freeze-stdlib"] }
88
rustpython-vm = { path = "../../vm", default-features = false, features = ["freeze-stdlib"] }
9-
rustpython-pylib = { path = "../../pylib", default-features = false, features = ["freeze-stdlib"] }
9+
rustpython-pylib = { path = "../../crates/pylib", default-features = false, features = ["freeze-stdlib"] }
1010

1111
[workspace]
1212

pylib/Lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)