Skip to content

Commit

Permalink
Use absolute path when extracting xgboost.tar.gz file
Browse files Browse the repository at this point in the history
  • Loading branch information
titsuki committed Aug 26, 2023
1 parent 2a3be8b commit b47d785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Algorithm/XGBoost/CustomBuilder.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class Algorithm::XGBoost::CustomBuilder:ver<0.0.5>:auth<cpan:TITSUKI> is Distrib
my $archive-file = "xgboost.tar.gz".IO.e
?? "xgboost.tar.gz"
!! $fetcher.fetch(Candidate.new(:$uri), "xgboost.tar.gz");

my @extract-backends = [
{ module => "Zef::Service::Shell::tar" },
{ module => "Zef::Service::Shell::p5tar" },
];
my $extractor = Zef::Extract.new(:backends(@extract-backends));
my $extract-dir = $extractor.extract(Candidate.new(:uri($archive-file)), $*CWD);
my $archive-file-with-cwd = $*CWD.add($archive-file);
my $extract-dir = $extractor.extract(Candidate.new(:uri($archive-file-with-cwd)), $*CWD);
chdir("xgboost");
when self!is-osx { shell("brew install libomp && cmake . && make") }
when self!is-linux { shell("cmake . && make") }
Expand Down

0 comments on commit b47d785

Please sign in to comment.