pkglts.dependency module
Dependency object to handle multi dependency managers.
- class pkglts.dependency.Dependency(name, version=None, pkg_mng=None, channel=None, intent='install')[source]
Bases:
object
Simple container to keep track of all the required info to install a dependency.
- channel
place to find the dependency depends on package_manager
- fmt_pip_requirement(extended=False)[source]
Format dependency for pip requirements.txt files
- Returns:
(str)
- intents
When does the package require this option: - ‘install’: only for installation (prod purpose) - ‘test’: for testing purpose only - ‘doc’: to compile the associated documentation - ‘example’: to replay the examples - ‘pkglts’: used internally to create dependencies between pkglts options
- is_conda(strict=True)[source]
Check whether this dependency can be managed by conda
- Parameters:
strict (bool) – whether only conda can manage this dep
- Returns:
(bool)
- is_pip(strict=True)[source]
Check whether this dependency can be managed by pip
- Parameters:
strict (bool) – whether only pip can manage this dep
- Returns:
(bool)
- name
name of dependency
- package_manager
either conda, pip or git url
- version
expected version