@@ -13,7 +13,7 @@ fn main() {
13
13
14
14
let out_dir = PathBuf :: from ( env:: var_os ( "OUT_DIR" ) . unwrap ( ) ) ;
15
15
16
- let uri = format ! ( "{}/{}" , DOWNLOAD_URL , DOWNLOAD_BINARY ) ;
16
+ let uri = DOWNLOAD_URL ;
17
17
let archive_path = out_dir. join ( "hdf5-conda.tar.bz2" ) ;
18
18
if archive_path. exists ( ) {
19
19
println ! ( "Using existing archive" ) ;
@@ -31,8 +31,6 @@ fn main() {
31
31
println ! ( "cargo:include={}" , inc_dir. display( ) ) ;
32
32
}
33
33
34
- pub const DOWNLOAD_URL : & str = "https://anaconda.org/conda-forge/hdf5/1.12.1/download" ;
35
-
36
34
const INC_PATH : & str = {
37
35
cfg_if ! {
38
36
if #[ cfg( any( target_os = "linux" , target_os = "macos" ) ) ] {
@@ -69,16 +67,16 @@ const LIB_PATH: &str = {
69
67
}
70
68
} ;
71
69
72
- const DOWNLOAD_BINARY : & str = {
70
+ const DOWNLOAD_URL : & str = {
73
71
cfg_if ! {
74
72
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"
76
74
} 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"
78
76
} 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"
80
78
} 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"
82
80
} else {
83
81
compile_error!( "This package can not be used on this arch" ) ;
84
82
}
0 commit comments