Skip to content

Commit

Permalink
WIP generating Python module is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDesforges committed Jan 8, 2023
1 parent 23234df commit 6386585
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ markdown = ["termimad"]
repl = ["rustyline", "rustyline-derive", "ansi_term"]
repl-wasm = ["wasm-bindgen", "js-sys", "serde_repr"]
doc = [ "comrak" ]
python-module = [ "pyo3" ]

[build-dependencies]
lalrpop = "0.19.6"
Expand Down Expand Up @@ -66,7 +67,7 @@ comrak = { version = "0.12.1", optional = true, features = [] }
once_cell = "1.14.0"
typed-arena = "2.0.1"

pyo3 = { version = "0.17.3", features = ["extension-module"] }
pyo3 = { version = "0.17.3", optional = true, features = ["extension-module"] }

[dev-dependencies]
pretty_assertions = "1.2.1"
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = ["maturin>=0.14,<0.15"]
build-backend = "maturin"

[tool.maturin]
cargo-extra-args = "--features python-module"

1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub mod parser;
pub mod position;
pub mod pretty;
pub mod program;
#[cfg(feature = "python-module")]
pub mod python;
pub mod repl;
pub mod serialize;
Expand Down

0 comments on commit 6386585

Please sign in to comment.