Check if all the packages in pkglist are installed:
>>> import upe
>>> upe.query('foo', 'bar')
False
>>> upe.install('foo') # Install foo
>>> upe.query('foo', 'bar')
False
>>> upe.install('bar') # Install bar
>>> upe.query('foo', 'bar')
True
Hint
This is useful for dependency checking.
Get the currently installed version of pkg.
Check if a packge is needed for any other installed package (this may take some time with many packages installed). Any package on ignore won’t be checked. By default, ignore is an empty list. Will return the following:
# If package x needs pkg:
(True, ('x',))
# If packages x and y require pkg:
(True, ('x', 'y'))
# Else:
(False,)
Tip
This is used on upe.pkgmgmt.remove() to check if a package can be safely uninstalled. Ignore is used if other packages will be uninstalled too.