diff --git a/ort-sys/build.rs b/ort-sys/build.rs index 5969a6f..23e94a8 100644 --- a/ort-sys/build.rs +++ b/ort-sys/build.rs @@ -1,15 +1,7 @@ use std::{ -<<<<<<< HEAD - env, fs, + env, fs, io, path::{Path, PathBuf}, process::Command -||||||| parent of eb51646 (fix: concurrent downloads, ref #322) - env, fs, - path::{Path, PathBuf} -======= - env, fs, io, - path::{Path, PathBuf} ->>>>>>> eb51646 (fix: concurrent downloads, ref #322) }; #[allow(unused)] @@ -430,14 +422,8 @@ fn prepare_libort_dir() -> (PathBuf, bool) { .join(target) .join(prebuilt_hash); -<<<<<<< HEAD let ort_extract_dir = prebuilt_url.split('/').last().unwrap().strip_suffix(".tgz").unwrap(); - let lib_dir = cache_dir.join(ort_extract_dir); -||||||| parent of eb51646 (fix: concurrent downloads, ref #322) - let lib_dir = cache_dir.join(ORT_EXTRACT_DIR); -======= - let lib_dir = bin_extract_dir.join(ORT_EXTRACT_DIR); ->>>>>>> eb51646 (fix: concurrent downloads, ref #322) + let lib_dir = bin_extract_dir.join(ort_extract_dir); if !lib_dir.exists() { let downloaded_file = fetch_file(prebuilt_url); assert!(verify_file(&downloaded_file, prebuilt_hash), "hash of downloaded ONNX Runtime binary does not match!"); diff --git a/ort-sys/src/internal/mod.rs b/ort-sys/src/internal/mod.rs index 45c67ba..6cb610a 100644 --- a/ort-sys/src/internal/mod.rs +++ b/ort-sys/src/internal/mod.rs @@ -1,12 +1,6 @@ use std::hash::{BuildHasher, Hasher, RandomState}; pub mod dirs; -<<<<<<< HEAD - -#[cfg(feature = "download-binaries")] -include!(concat!(env!("OUT_DIR"), "/downloaded_version.rs")); -||||||| parent of eb51646 (fix: concurrent downloads, ref #322) -======= pub fn random_identifier() -> String { let mut state = RandomState::new().build_hasher().finish(); @@ -20,4 +14,3 @@ pub fn random_identifier() -> String { .map(|i| b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[i as usize % 62] as char) .collect() } ->>>>>>> eb51646 (fix: concurrent downloads, ref #322) diff --git a/ort-sys/src/lib.rs b/ort-sys/src/lib.rs index ee08e63..660e76f 100644 --- a/ort-sys/src/lib.rs +++ b/ort-sys/src/lib.rs @@ -10,6 +10,9 @@ #[doc(hidden)] pub mod internal; +#[cfg(feature = "download-binaries")] +include!(concat!(env!("OUT_DIR"), "/downloaded_version.rs")); + pub const ORT_API_VERSION: u32 = 17; pub use std::ffi::{c_char, c_int, c_ulong, c_ulonglong, c_ushort, c_void};