Skip to content

Commit e44ccb0

Browse files
morealyouknowone
andauthored
Build lalrpop without lalrpop binary (#4107)
Co-authored-by: Jeong YunWon <[email protected]>
1 parent c334626 commit e44ccb0

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
env:
16-
CARGO_ARGS: --features ssl,jit
16+
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
1717
NON_WASM_PACKAGES: >-
1818
-p rustpython-bytecode
1919
-p rustpython-common
@@ -126,9 +126,9 @@ jobs:
126126
if: runner.os == 'macOS'
127127
- uses: Swatinem/rust-cache@v1
128128
- name: run rust tests
129-
run: cargo test --workspace --exclude rustpython_wasm --verbose ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
129+
run: cargo test --workspace --exclude rustpython_wasm --verbose --features threading ${{ env.CARGO_ARGS }} ${{ env.NON_WASM_PACKAGES }}
130130
- name: check compilation without threading
131-
run: cargo check ${{ env.CARGO_ARGS }} --no-default-features
131+
run: cargo check ${{ env.CARGO_ARGS }}
132132

133133
- name: prepare AppleSilicon build
134134
uses: dtolnay/rust-toolchain@stable
@@ -244,7 +244,7 @@ jobs:
244244
if: runner.os == 'macOS'
245245
- uses: Swatinem/rust-cache@v1
246246
- name: build rustpython
247-
run: cargo build --release --verbose ${{ env.CARGO_ARGS }}
247+
run: cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }}
248248
- uses: actions/setup-python@v2
249249
with:
250250
python-version: "3.10"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ members = [
1919
]
2020

2121
[features]
22-
default = ["threading", "stdlib", "zlib", "importlib", "encodings"]
22+
default = ["threading", "stdlib", "zlib", "importlib", "encodings", "rustpython-parser/lalrpop"]
2323
importlib = ["rustpython-vm/importlib"]
2424
encodings = ["rustpython-vm/encodings"]
2525
stdlib = ["rustpython-stdlib"]

vm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ importlib = []
1414
encodings = ["importlib"]
1515
vm-tracing-logging = []
1616
flame-it = ["flame", "flamer"]
17-
freeze-stdlib = ["rustpython-pylib/stdlib"]
17+
freeze-stdlib = ["rustpython-pylib/freeze-stdlib"]
1818
jit = ["rustpython-jit"]
1919
threading = ["rustpython-common/threading"]
2020
compile-parse = ["parser", "compiler"]

vm/pylib-crate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ edition = "2021"
99
include = ["Cargo.toml", "src/**/*.rs", "Lib/", "!Lib/**/test/", "!Lib/**/*.pyc"]
1010

1111
[features]
12-
stdlib = []
12+
freeze-stdlib = []
1313

1414
[dependencies]
1515
rustpython-derive = { version = "0.1.2", path = "../../derive" }

vm/pylib-crate/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ pub fn frozen_builtins() -> impl Iterator<Item = (String, FrozenModule)> {
1818
)
1919
}
2020

21-
#[cfg(not(feature = "stdlib"))]
21+
#[cfg(not(feature = "freeze-stdlib"))]
2222
pub fn frozen_core() -> impl Iterator<Item = (String, FrozenModule)> {
2323
rustpython_derive::py_freeze!(
2424
dir = "../Lib/core_modules",
2525
crate_name = "rustpython_bytecode"
2626
)
2727
}
2828

29-
#[cfg(feature = "stdlib")]
29+
#[cfg(feature = "freeze-stdlib")]
3030
pub fn frozen_stdlib() -> impl Iterator<Item = (String, FrozenModule)> {
3131
rustpython_derive::py_freeze!(dir = "../../Lib", crate_name = "rustpython_bytecode")
3232
}

0 commit comments

Comments
 (0)