File tree Expand file tree Collapse file tree 2 files changed +21
-9
lines changed Expand file tree Collapse file tree 2 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,23 @@ name = "openblas-build"
3
3
version = " 0.10.7"
4
4
license = " Apache-2.0/MIT"
5
5
edition = " 2018"
6
- authors = [
7
- " Toshiki Teramura <toshiki.teramura@gmail.com>" ,
8
- ]
6
+ authors = [" Toshiki Teramura <toshiki.teramura@gmail.com>" ]
9
7
description = " The package provides a build helper for OpenBLAS."
10
8
documentation = " https://docs.rs/openblas-build"
11
9
homepage = " https://github.com/blas-lapack-rs/openblas-src"
12
10
repository = " https://github.com/blas-lapack-rs/openblas-src"
13
- readme = " ../README.md"
14
- exclude = [
15
- " test_build/" ,
16
- ]
11
+ readme = " ../README.md"
12
+ exclude = [" test_build/" ]
17
13
18
14
[dependencies ]
19
15
anyhow = " 1.0.68"
20
16
flate2 = " 1.0.25"
21
17
tar = " 0.4.38"
22
18
thiserror = " 1.0.22"
23
- ureq = " 2.5.0"
19
+ ureq = { version = " 2.5.0" , default-features = false , features = [
20
+ " native-certs" ,
21
+ " native-tls" ,
22
+ " gzip" ,
23
+ ] }
24
+ native-tls = { version = " 0.2.11" }
24
25
walkdir = " 2.3.1"
Original file line number Diff line number Diff line change @@ -13,11 +13,22 @@ pub fn openblas_source_url() -> String {
13
13
pub fn download ( out_dir : & Path ) -> Result < PathBuf > {
14
14
let dest = out_dir. join ( format ! ( "OpenBLAS-{}" , OPENBLAS_VERSION ) ) ;
15
15
if !dest. exists ( ) {
16
- let buf = ureq:: get ( & openblas_source_url ( ) ) . call ( ) ?. into_reader ( ) ;
16
+ let buf = get_agent ( )
17
+ . get ( & openblas_source_url ( ) )
18
+ . call ( ) ?
19
+ . into_reader ( ) ;
17
20
let gz_stream = flate2:: read:: GzDecoder :: new ( buf) ;
18
21
let mut ar = tar:: Archive :: new ( gz_stream) ;
19
22
ar. unpack ( out_dir) ?;
20
23
assert ! ( dest. exists( ) ) ;
21
24
}
22
25
Ok ( dest)
23
26
}
27
+
28
+ fn get_agent ( ) -> ureq:: Agent {
29
+ ureq:: AgentBuilder :: new ( )
30
+ . tls_connector ( std:: sync:: Arc :: new (
31
+ native_tls:: TlsConnector :: new ( ) . expect ( "failed to create TLS connector" ) ,
32
+ ) )
33
+ . build ( )
34
+ }
You can’t perform that action at this time.
0 commit comments