Skip to content

Commit de4e209

Browse files
committed
Use static library for macos
1 parent 694bee4 commit de4e209

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
uses: actions-rs/toolchain@v1
3434
with: {toolchain: '${{ matrix.rust }}', profile: minimal, override: true}
3535
- name: Run tests
36-
run: cargo test --features hdf5-sys/conda --workspace --exclude hdf5-derive,hdf5-src
36+
run: cargo test --features hdf5-sys/conda --workspace --exclude hdf5-derive --exclude hdf5-src

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)