File tree Expand file tree Collapse file tree 4 files changed +7
-28
lines changed Expand file tree Collapse file tree 4 files changed +7
-28
lines changed Original file line number Diff line number Diff line change
1
+ [submodule "xgboost-sys/xgboost "]
2
+ path = xgboost-sys/xgboost
3
+ url = https://github.com/davechallis/xgboost
4
+ branch = v0.80-modified
Original file line number Diff line number Diff line change @@ -13,4 +13,3 @@ libc = "0.2"
13
13
14
14
[build-dependencies ]
15
15
bindgen = " 0.36"
16
- git2 = " 0.7"
Original file line number Diff line number Diff line change 1
1
extern crate bindgen;
2
- extern crate git2;
3
2
4
3
use std:: process:: Command ;
5
4
use std:: env;
6
5
use std:: path:: PathBuf ;
7
6
8
- // Contains symlinks, so cannot be included as a git submodule and packaged with cargo. Downloaded
9
- // at build time instead.
10
- static XGBOOST_SRC : & str = "https://github.com/dmlc/xgboost.git" ;
11
- static XGBOOST_SPEC : & str = "refs/tags/v0.80" ;
12
-
13
7
fn main ( ) {
14
- let target = env:: var ( "TARGET" ) . expect ( "Failed to read TARGET environment variable" ) ;
15
-
16
- let xgb_root = std:: path:: Path :: new ( "xgboost" ) ;
17
-
18
- let repo = {
19
- if !xgb_root. exists ( ) {
20
- match git2:: Repository :: clone_recurse ( XGBOOST_SRC , "xgboost" ) {
21
- Ok ( repo) => repo,
22
- Err ( e) => panic ! ( "failed to clone: {}" , e) ,
23
- }
24
- } else {
25
- match git2:: Repository :: open ( "xgboost" ) {
26
- Ok ( repo) => repo,
27
- Err ( e) => panic ! ( "failed to open: {}" , e) ,
28
- }
29
- }
30
- } ;
31
-
32
- repo. set_head ( XGBOOST_SPEC ) . expect ( "failed to set head" ) ;
33
-
34
- let xgb_root = xgb_root. canonicalize ( ) . unwrap ( ) ;
8
+ let xgb_root = std:: fs:: canonicalize ( "xgboost" ) . unwrap ( ) ;
9
+ let target = env:: var ( "TARGET" ) . unwrap ( ) ;
35
10
36
11
// TODO: allow for dynamic/static linking
37
12
// TODO: check whether rabit should be built/linked
You can’t perform that action at this time.
0 commit comments