anki/pylib/rsbridge/build.rs

13 lines
532 B
Rust
Raw Normal View History

2021-04-13 10:59:16 +02:00
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
fn main() {
// this build script simply exists so we can extend the link path
// inside Bazel based on an env var, as we need to provide a custom
// path to Python on Windows.
if let Ok(path) = std::env::var("PYTHON_SYS_EXECUTABLE") {
let path = std::path::Path::new(&path).with_file_name("libs");
println!("cargo:rustc-link-search={}", path.to_str().unwrap());
}
2020-11-02 06:02:30 +01:00
}