| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Ixchel::Actions::install_pip; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
124278
|
use 5.006; |
|
|
1
|
|
|
|
|
4
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
48
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
57
|
|
|
6
|
1
|
|
|
1
|
|
643
|
use File::Slurp; |
|
|
1
|
|
|
|
|
47726
|
|
|
|
1
|
|
|
|
|
109
|
|
|
7
|
1
|
|
|
1
|
|
553
|
use Ixchel::functions::install_pip; |
|
|
1
|
|
|
|
|
9
|
|
|
|
1
|
|
|
|
|
98
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use base 'Ixchel::Actions::base'; |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
61
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Ixchel::Actions::install_pip - Install pip via packages. |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Version 0.2.0 |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.2.0'; |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 CLI SYNOPSIS |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
ixchel -a install_pip |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 CODE SYNOPSIS |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
use Data::Dumper; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
my $results=$ixchel->action(action=>'instal_pip', opts=>{}); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
if ($results->{ok}) { |
|
33
|
|
|
|
|
|
|
print $results->{status_text}; |
|
34
|
|
|
|
|
|
|
}else{ |
|
35
|
|
|
|
|
|
|
die('Action errored... '.joined("\n", @{$results->{errors}})); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 RESULT HASH REF |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
.errors :: A array of errors encountered. |
|
41
|
|
|
|
|
|
|
.status_text :: A string description of what was done and the results. |
|
42
|
|
|
|
|
|
|
.ok :: Set to zero if any of the above errored. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
0
|
0
|
|
sub new_extra { } |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub action_extra { |
|
49
|
0
|
|
|
0
|
0
|
|
my $self = $_[0]; |
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
$self->status_add( status => 'Installing pip via packges' ); |
|
52
|
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
|
eval { install_pip; }; |
|
|
0
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
if ($@) { |
|
55
|
0
|
|
|
|
|
|
$self->status_add( status => 'Failed to install pip via packages ... ' . $@, error => 1 ); |
|
56
|
|
|
|
|
|
|
} else { |
|
57
|
0
|
|
|
|
|
|
$self->status_add( status => 'pip installed' ); |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return undef; |
|
61
|
|
|
|
|
|
|
} ## end sub action_extra |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub short { |
|
64
|
0
|
|
|
0
|
1
|
|
return 'Install pip via packages.'; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub opts_data { |
|
68
|
0
|
|
|
0
|
1
|
|
return ' |
|
69
|
|
|
|
|
|
|
'; |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
1; |