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
|
|
|
|
|
2020-11-01 05:26:58 +01:00
|
|
|
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.
|
2021-10-02 12:42:03 +02:00
|
|
|
if let Ok(path) = std::env::var("PYO3_PYTHON") {
|
2020-11-01 05:26:58 +01:00
|
|
|
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
|
|
|
}
|