Skip to content

Commit e72692b

Browse files
committed
Use static library for macos
1 parent b6dcfbe commit e72692b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

hdf5-conda/build.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313

1414
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
1515

16-
let uri = format!("{}/{}", DOWNLOAD_URL, DOWNLOAD_BINARY);
16+
let uri = DOWNLOAD_URL;
1717
let archive_path = out_dir.join("hdf5-conda.tar.bz2");
1818
if archive_path.exists() {
1919
println!("Using existing archive");
@@ -31,8 +31,6 @@ fn main() {
3131
println!("cargo:include={}", inc_dir.display());
3232
}
3333

34-
pub const DOWNLOAD_URL: &str = "https://anaconda.org/conda-forge/hdf5/1.12.1/download";
35-
3634
const INC_PATH: &str = {
3735
cfg_if! {
3836
if #[cfg(any(target_os = "linux", target_os = "macos"))] {
@@ -69,16 +67,16 @@ const LIB_PATH: &str = {
6967
}
7068
};
7169

72-
const DOWNLOAD_BINARY: &str = {
70+
const DOWNLOAD_URL: &str = {
7371
cfg_if! {
7472
if #[cfg(all(target_os = "linux", target_arch = "x86_64"))] {
75-
"linux-64/hdf5-1.12.1-nompi_h2750804_102.tar.bz2"
73+
"https://anaconda.org/conda-forge/hdf5/1.12.1/download/linux-64/hdf5-1.12.1-nompi_h2750804_102.tar.bz2"
7674
} else if #[cfg(all(target_os = "linux", target_arch = "aarch64"))] {
77-
"linux-aarch64/hdf5-1.12.1-nompi_h774d4d8_102.tar.bz2"
75+
"https://anaconda.org/conda-forge/hdf5/1.12.1/download/linux-aarch64/hdf5-1.12.1-nompi_h774d4d8_102.tar.bz2"
7876
} else if #[cfg(all(target_os = "macos", target_arch = "x86_64"))] {
79-
"osx-64/hdf5-1.12.1-nompi_h2f0ef1a_102.tar.bz2"
77+
"https://anaconda.org/conda-forge/hdf5-static/1.12.1/download/linux-aarch64/hdf5-static-1.12.1-nompi_hbbc3fb2_104.tar.bz2"
8078
} else if #[cfg(all(target_os = "windows", target_arch = "x86_64"))] {
81-
"win-64/hdf5-1.12.1-nompi_h57737ce_102.tar.bz2"
79+
"https://anaconda.org/conda-forge/hdf5/1.12.1/download/win-64/hdf5-1.12.1-nompi_h57737ce_102.tar.bz2"
8280
} else {
8381
compile_error!("This package can not be used on this arch");
8482
}

0 commit comments

Comments
 (0)