Skip to content

Commit c2e08c9

Browse files
committed
Move system-configuration dependency from stdlib to host_env
Re-export the macOS system-configuration crate as host_env::system_configuration and update _scproxy call sites.
1 parent c96b2ec commit c2e08c9

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎Cargo.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/host_env/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ libloading = "0.9"
4545
[target.'cfg(all(any(target_os = "linux", target_os = "macos", target_os = "windows", target_os = "android"), not(any(target_env = "musl", target_env = "sgx"))))'.dependencies]
4646
libffi = { workspace = true, features = ["system"] }
4747

48+
[target.'cfg(target_os = "macos")'.dependencies]
49+
system-configuration = { workspace = true }
50+
4851
[target.'cfg(windows)'.dependencies]
4952
junction = { workspace = true }
5053
schannel = { workspace = true }

‎crates/host_env/src/lib.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ pub mod time;
6565

6666
#[cfg(windows)]
6767
pub mod cert_store;
68+
#[cfg(target_os = "macos")]
69+
pub mod system_configuration {
70+
pub use ::system_configuration::*;
71+
}
6872
#[cfg(any(unix, windows))]
6973
pub mod faulthandler;
7074
#[cfg(any(unix, windows))]

‎crates/stdlib/Cargo.toml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ liblzma-sys = { workspace = true }
131131
paste = { workspace = true }
132132
widestring = { workspace = true }
133133

134-
[target.'cfg(target_os = "macos")'.dependencies]
135-
system-configuration = { workspace = true }
136-
137134
[dev-dependencies]
138135
insta = { workspace = true }
139136
rustpython-pylib = { workspace = true, features = [ "freeze-stdlib" ] }

‎crates/stdlib/src/scproxy.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ mod _scproxy {
99
builtins::{PyDict, PyDictRef, PyStr},
1010
convert::ToPyObject,
1111
};
12-
use system_configuration::core_foundation::{
12+
use rustpython_host_env::system_configuration::core_foundation::{
1313
array::CFArray,
1414
base::{CFType, FromVoid, TCFType},
1515
dictionary::CFDictionary,
1616
number::CFNumber,
1717
string::{CFString, CFStringRef},
1818
};
19-
use system_configuration::sys::{
19+
use rustpython_host_env::system_configuration::sys::{
2020
dynamic_store_copy_specific::SCDynamicStoreCopyProxies, schema_definitions::*,
2121
};
2222

0 commit comments

Comments
 (0)