diff --git a/context-py/Cargo.toml b/context-py/Cargo.toml index a23248f8..b4cb4900 100644 --- a/context-py/Cargo.toml +++ b/context-py/Cargo.toml @@ -14,5 +14,10 @@ path = "bin/stub_gen.rs" [dependencies] context = { path = "../context", features = ["git-access", "pyo3"] } -pyo3 = { version = "0.22.5", features = ["abi3-py39", "extension-module"] } pyo3-stub-gen = "0.6.0" + +[target.'cfg(target_os = "linux")'.dependencies] +pyo3 = { version = "0.22.5", features = ["abi3-py39", "extension-module"] } + +[target.'cfg(target_os = "macos")'.dependencies] +pyo3 = { version = "0.22.5", features = ["abi3-py39"] } diff --git a/context/Cargo.toml b/context/Cargo.toml index a4d3b8d4..1e39eefa 100644 --- a/context/Cargo.toml +++ b/context/Cargo.toml @@ -16,10 +16,6 @@ gix = { version = "0.63.0", default-features = false, features = [ ], optional = true } js-sys = { version = "0.3.70", optional = true } openssl = { version = "0.10.66", features = ["vendored"], optional = true } -pyo3 = { version = "0.22.5", optional = true, features = [ - "abi3-py39", - "extension-module", -] } pyo3-stub-gen = { version = "0.6.0", optional = true } quick-junit = "0.5.0" quick-xml = "0.36.2" @@ -31,6 +27,15 @@ thiserror = "1.0.63" uuid = { version = "1.10.0", features = ["v5"] } wasm-bindgen = { version = "0.2.84", optional = true } +[target.'cfg(target_os = "linux")'.dependencies] +pyo3 = { version = "0.22.5", optional = true, features = [ + "abi3-py39", + "extension-module", +] } + +[target.'cfg(target_os = "macos")'.dependencies] +pyo3 = { version = "0.22.5", optional = true, features = ["abi3-py39"] } + [features] default = ["git-access"] git-access = ["dep:gix", "dep:openssl"]