NAME
Doit::Pip - commands for dealing with pip packages
SYNOPSIS
use Doit;
my $doit = Doit->init;
$doit->add_component('pip');
$doit->pip_install_packages(qw(zk-shell));
my @missing_packages = $doit->pip_missing_packages(qw(zk-shell));
DESCRIPTION
Doit::Pip is a Doit component providing commands for dealing with pip packages. It has to be added to a script using Doit's add_component:
$doit->add_component('pip');
Only support for pip3 is available.
DOIT COMMANDS
The following commands are added to the Doit runner object:
pip_install_packages
my @installed_packages = $doit->pip_install_packages(@packages);
Make sure that the listed pip packages are installed (using pip3(1)). Return a list of the packages which were actually installed during the execution of this command (or the number of packages in scalar context).
pip_missing_packages
my @missing_packages = $doit->pip_missing_packages(@packages);
Return the packages out of @packages which are not yet installed. This is an "informational" command and runs even in dry-run mode.
can_pip
my $available = $doit->can_pip;
Return a boolean value whether pip operation is possible (i.e. pip3
is installed).
Note that this component does not make sure that pip3
is installed. You have to assure this by installing the package yourself, i.e.
$doit->deb_install_packages(qw(python3-pip));
or
$doit->rpm_install_packages(qw(python3-pip));
AUTHOR
Slaven Rezic <srezic@cpan.org>
COPYRIGHT
Copyright (c) 2020 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.