diff --git a/Dockerfile b/Dockerfile index 845784948..526fbb58b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ ADD --chown=user:users . ${HOME}/hyperon-experimental WORKDIR ${HOME}/hyperon-experimental RUN cargo test --release -RUN cargo build --release +RUN cargo build --features python,git --release ENV BUILD=${HOME}/hyperon-experimental/build RUN mkdir ${BUILD} diff --git a/README.md b/README.md index 68d72d1d0..16e266292 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ cargo run --example sorted_list Run Rust REPL: ``` -cargo run --features no_python --bin metta-repl +cargo run --bin metta-repl ``` You can also find executable at `./target/debug/metta-repl`. @@ -188,7 +188,7 @@ metta-py ./tests/scripts/.metta Run REPL: ``` -cargo run --bin metta-repl +cargo run --features python --bin metta-repl ``` You can also find executable at `./target/debug/metta-repl`. diff --git a/python/tests/scripts/f1_imports.metta b/python/tests/scripts/f1_imports.metta index 5122b3ea3..6f32c95db 100644 --- a/python/tests/scripts/f1_imports.metta +++ b/python/tests/scripts/f1_imports.metta @@ -1,6 +1,6 @@ -; NOTE: This test won't work under no_python mode because it relies on +; NOTE: This test won't work under no python mode because it relies on ; specific atoms in the space. When running in Python, corelib and stdlib -; are separate modules, but in no_python mode there is no Python stdlib +; are separate modules, but in no python mode there is no Python stdlib ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Even at the very beginning of the script `(get-atoms &self)` diff --git a/repl/Cargo.toml b/repl/Cargo.toml index a9551a4e1..b641645aa 100644 --- a/repl/Cargo.toml +++ b/repl/Cargo.toml @@ -20,8 +20,7 @@ name = "metta-repl" path = "src/main.rs" [features] -default = ["python"] -no_python = ["hyperon"] +default = ["hyperon"] python = ["pyo3", "pep440_rs"] old_interpreter = ["hyperon/old_interpreter"] git = ["hyperon/git"] diff --git a/repl/src/metta_shim.rs b/repl/src/metta_shim.rs index 0ded3a402..286508770 100644 --- a/repl/src/metta_shim.rs +++ b/repl/src/metta_shim.rs @@ -30,7 +30,7 @@ pub fn exec_state_should_break() -> bool { } } -#[cfg(all(feature = "python", not(feature = "no_python")))] +#[cfg(feature = "python")] pub mod metta_interface_mod { use std::str::FromStr; use std::path::PathBuf; @@ -302,7 +302,7 @@ pub mod metta_interface_mod { } -/// The "no_python" path involves a reimplementation of all of the MeTTa interface points calling MeTTa +/// The "no python" path involves a reimplementation of all of the MeTTa interface points calling MeTTa /// directly instead of through Python. Maintaining two paths is a temporary stop-gap solution because /// we can only link the Hyperon Rust library through one pathway and the HyperonPy module is that path /// when the Python repl is used. @@ -310,7 +310,7 @@ pub mod metta_interface_mod { /// When we have the ability to statically link HyperonPy, we can remove this shim and call /// Hyperon and MeTTa from everywhere in the code. This will likely mean we can get rid of the clumsy /// implementations in the "python" version of metta_interface_mod. See See https://github.com/trueagi-io/hyperon-experimental/issues/283 -#[cfg(feature = "no_python")] +#[cfg(not(feature = "python"))] pub mod metta_interface_mod { use std::path::{PathBuf, Path}; use hyperon::metta::*;