Class: Pip

Inherits:
Thor
  • Object
show all
Defined in:
lib/pkg/pkgm/pip.rb

Instance Method Summary collapse

Instance Method Details

#install(package, *args) ⇒ Object



13
14
15
16
17
# File 'lib/pkg/pkgm/pip.rb', line 13

def install(package, *args)
  success = system 'python3', '-m', 'pip', 'install', *args, package

  PkgConfig.add(self.class.name, ConfigOptions::PACKAGES, package, success)
end

#uninstall(package, *args) ⇒ Object



26
27
28
29
30
# File 'lib/pkg/pkgm/pip.rb', line 26

def uninstall(package, *args)
  success = system 'python3', '-m', 'pip', 'uninstall', *args, package

  PkgConfig.remove(self.class.name, ConfigOptions::PACKAGES, package, success)
end

#update(*_args) ⇒ Object



20
21
22
23
# File 'lib/pkg/pkgm/pip.rb', line 20

def update(*_args)
  Log::LOGGER.error('Update is not supported for pip')
  abort('Update is not supported for pip')
end