another shot at trying to fix build failure in docs.rs
MODIFY
Cargo.toml
Cargo.toml
@@ -6,7 +6,7 @@ repository = "https://github.com/kali/opencv-rust"
readme = "README.md"
keywords = [ "opencv", "vision" ]
license = "MIT"
-version = "0.5.1"
+version = "0.5.2"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>"]
build = "build.rs"

MODIFY
build.rs
build.rs
@@ -55,10 +55,6 @@ fn build_wrapper(opencv: pkg_config::Library) {
println!("cargo:rerun-if-changed=gen_rust.py");
let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());
- // detect building for docs.rs
- if out_dir.starts_with("/home/cratesfyi/cratesfyi/debug/build/") {
- return;
- }
let out_dir_as_str = out_dir.to_str().unwrap();
let hub_dir = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()).join("src");
let module_dir = hub_dir.join("hub");
@@ -332,5 +328,8 @@ fn build_wrapper(opencv: pkg_config::Library) {
}
fn main() {
+ // detect building for docs.rs
+ if !std::env::var("OUT_DIR").unwrap().starts_with("/home/cratesfyi/cratesfyi/debug/build/") {
build_wrapper(link_wrapper());
}
+}

another shot at trying to fix build failure in docs.rs