From 52fbd2219e8996e040a007c6091ebd91ff6214b8 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 2 Jan 2025 21:59:37 +0000 Subject: [PATCH] fix docs ci --- .github/workflows/docs.yml | 2 +- mitmproxy-rs/Cargo.toml | 1 + mitmproxy-rs/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 278cc37c..b21e7032 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: - uses: install-pinned/mypy@2b552bed479e3f7065314667b670f7303619e989 - uses: install-pinned/pdoc@fd9469ecb06f32b7012e07e449ce98b217bf1189 - - run: maturin build + - run: maturin build --features docs working-directory: ./mitmproxy-rs - run: pip install --no-index --no-dependencies --find-links target/wheels/ mitmproxy_rs diff --git a/mitmproxy-rs/Cargo.toml b/mitmproxy-rs/Cargo.toml index c7bf484b..e132c596 100644 --- a/mitmproxy-rs/Cargo.toml +++ b/mitmproxy-rs/Cargo.toml @@ -38,6 +38,7 @@ env_logger = "0.11" [features] tracing = ["console-subscriber"] +docs = [] [[test]] name = "test_task" diff --git a/mitmproxy-rs/src/lib.rs b/mitmproxy-rs/src/lib.rs index 994ae0ce..bde795bd 100644 --- a/mitmproxy-rs/src/lib.rs +++ b/mitmproxy-rs/src/lib.rs @@ -97,7 +97,7 @@ mod mitmproxy_rs { // Import platform-specific modules here so that missing dependencies are raising immediately. #[cfg(target_os = "macos")] m.py().import("mitmproxy_macos")?; - #[cfg(target_os = "linux")] + #[cfg(all(target_os = "linux", not(feature = "docs")))] m.py().import("mitmproxy_linux")?; #[cfg(windows)] m.py().import("mitmproxy_windows")?;