Browse Source

Merge pull request #281 from dora-rs/remove-pyo3-in-daemon

Remove pyo3 in runtime and daemon as it generates `libpython` depende…
tags/v0.2.3-rc6
Philipp Oppermann GitHub 2 years ago
parent
commit
4769287779
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions
  1. +1
    -1
      apis/python/node/Cargo.toml
  2. +3
    -2
      binaries/runtime/Cargo.toml
  3. +7
    -0
      binaries/runtime/src/operator/mod.rs

+ 1
- 1
apis/python/node/Cargo.toml View File

@@ -20,7 +20,7 @@ pyo3 = { version = "0.18", features = ["eyre", "abi3-py37"] }
eyre = "0.6"
serde_yaml = "0.8.23"
flume = "0.10.14"
dora-runtime = { workspace = true, features = ["tracing"] }
dora-runtime = { workspace = true, features = ["tracing", "python"] }
arrow = { version = "35.0.0", features = ["pyarrow"] }

[lib]


+ 3
- 2
binaries/runtime/Cargo.toml View File

@@ -10,7 +10,7 @@ license.workspace = true

[dependencies]
dora-node-api = { workspace = true, default-features = false }
dora-operator-api-python = { workspace = true }
dora-operator-api-python = { workspace = true, optional = true }
dora-operator-api-types = { workspace = true }
dora-core = { workspace = true }
dora-tracing = { workspace = true, optional = true }
@@ -28,7 +28,7 @@ serde_yaml = "0.8.23"
tokio = { version = "1.24.2", features = ["full"] }
tokio-stream = "0.1.8"
# pyo3-abi3 flag allow simpler linking. See: https://pyo3.rs/v0.13.2/building_and_distribution.html
pyo3 = { version = "0.18", features = ["eyre", "abi3-py37"] }
pyo3 = { version = "0.18", features = ["eyre", "abi3-py37"], optional = true }
tracing = "0.1.36"
tracing-subscriber = "0.3.15"
dora-download = { workspace = true }
@@ -41,3 +41,4 @@ default = ["tracing"]
tracing = ["dora-tracing"]
telemetry = ["tracing", "opentelemetry", "tracing-opentelemetry"]
metrics = ["opentelemetry", "opentelemetry-system-metrics", "dora-metrics"]
python = ["pyo3", "dora-operator-api-python"]

+ 7
- 0
binaries/runtime/src/operator/mod.rs View File

@@ -9,6 +9,7 @@ use std::any::Any;
use tokio::sync::{mpsc::Sender, oneshot};

pub mod channel;
#[cfg(feature = "python")]
mod python;
mod shared_lib;

@@ -36,7 +37,9 @@ pub fn run_operator(
)
})?;
}
#[allow(unused_variables)]
OperatorSource::Python(source) => {
#[cfg(feature = "python")]
python::run(
node_id,
&operator_definition.id,
@@ -51,6 +54,10 @@ pub fn run_operator(
operator_definition.id
)
})?;
#[cfg(not(feature = "python"))]
tracing::error!(
"Dora runtime tried spawning Python Operator outside of python environment."
);
}
OperatorSource::Wasm(_) => {
tracing::error!("WASM operators are not supported yet");


Loading…
Cancel
Save