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"
33version = " 0.10.7"
44license = " Apache-2.0/MIT"
55edition = " 2018"
6- authors = [
7- " Toshiki Teramura <[email protected] >" ,
8- ]
6+ authors = [
" Toshiki Teramura <[email protected] >" ]
97description = " The package provides a build helper for OpenBLAS."
108documentation = " https://docs.rs/openblas-build"
119homepage = " https://github.com/blas-lapack-rs/openblas-src"
1210repository = " 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/" ]
1713
1814[dependencies ]
1915anyhow = " 1.0.68"
2016flate2 = " 1.0.25"
2117tar = " 0.4.38"
2218thiserror = " 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" }
2425walkdir = " 2.3.1"
Original file line number Diff line number Diff line change @@ -13,11 +13,22 @@ pub fn openblas_source_url() -> String {
1313pub fn download ( out_dir : & Path ) -> Result < PathBuf > {
1414 let dest = out_dir. join ( format ! ( "OpenBLAS-{}" , OPENBLAS_VERSION ) ) ;
1515 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 ( ) ;
1720 let gz_stream = flate2:: read:: GzDecoder :: new ( buf) ;
1821 let mut ar = tar:: Archive :: new ( gz_stream) ;
1922 ar. unpack ( out_dir) ?;
2023 assert ! ( dest. exists( ) ) ;
2124 }
2225 Ok ( dest)
2326}
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