Class: Dependencies::Pip

Inherits:
Dependency show all
Defined in:
lib/dependencies/pip.rb

Constant Summary collapse

DEFAULT_PIP =
"python3 -m pip"

Constants inherited from Dependency

Dependency::DESCRIPTION_TYPE_WIDTH

Instance Attribute Summary

Attributes inherited from Dependency

#name

Instance Method Summary collapse

Methods inherited from Dependency

#always_act?, #exit_code, #initialize, #output, #success?, #type

Constructor Details

This class inherits a constructor from Dependency

Instance Method Details

#meetObject



13
14
15
# File 'lib/dependencies/pip.rb', line 13

def meet
	execute("#{pip} install #{name}")
end

#met?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/dependencies/pip.rb', line 9

def met?
	execute("#{pip} show #{name}")
end

#should_meet?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/dependencies/pip.rb', line 22

def should_meet?
	true
end

#unmeetObject



17
18
19
20
# File 'lib/dependencies/pip.rb', line 17

def unmeet
	# do nothing; we don't want to uninstall packages and reinstall them every time
	true
end