Handle vague dependencies.
This commit is contained in:
parent
2ce79cc893
commit
3bb2750476
1 changed files with 11 additions and 0 deletions
|
@ -63,6 +63,7 @@ from ..requirements import (
|
|||
PythonPackageRequirement,
|
||||
CertificateAuthorityRequirement,
|
||||
LibtoolRequirement,
|
||||
VagueDependencyRequirement,
|
||||
)
|
||||
|
||||
|
||||
|
@ -228,6 +229,16 @@ def get_package_for_python_module(apt_mgr, module, python_version, specs):
|
|||
return [AptRequirement(python_spec_to_apt_rels(name, specs)) for name in names]
|
||||
|
||||
|
||||
def resolve_vague_dep_req(apt_mgr, req):
|
||||
name = req.name
|
||||
if name.startswith('gnu '):
|
||||
name = name[4:]
|
||||
options = []
|
||||
options.extend(resolve_binary_req(apt_mgr, [BinaryRequirement(name)]))
|
||||
options.extend(resolve_binary_req(apt_mgr, [LibraryRequirement(name)]))
|
||||
return options
|
||||
|
||||
|
||||
def resolve_binary_req(apt_mgr, req):
|
||||
if posixpath.isabs(req.binary_name):
|
||||
paths = [req.binary_name]
|
||||
|
|
Loading…
Add table
Reference in a new issue