Crate support.
This commit is contained in:
parent
8310d973ad
commit
c69823be6d
2 changed files with 10 additions and 2 deletions
|
@ -63,7 +63,9 @@ from buildlog_consultant.common import (
|
|||
MissingX11,
|
||||
MissingPerlPredeclared,
|
||||
MissingLatexFile,
|
||||
MissingCargoCrate,
|
||||
)
|
||||
from buildlog_consultant.apt import UnsatisfiedDependencies
|
||||
|
||||
from .fix_build import BuildFixer
|
||||
from .requirements import (
|
||||
|
@ -105,6 +107,7 @@ from .requirements import (
|
|||
IntrospectionTypelibRequirement,
|
||||
PerlPreDeclaredRequirement,
|
||||
LatexPackageRequirement,
|
||||
CargoCrateRequirement,
|
||||
)
|
||||
from .resolver import UnsatisfiedRequirements
|
||||
|
||||
|
@ -183,6 +186,9 @@ def problem_to_upstream_requirement(problem): # noqa: C901
|
|||
return CertificateAuthorityRequirement(problem.url)
|
||||
elif isinstance(problem, MissingPerlPredeclared):
|
||||
return PerlPreDeclaredRequirement(problem.name)
|
||||
elif isinstance(problem, MissingCargoCrate):
|
||||
# TODO(jelmer): handle problem.requirements
|
||||
return CargoCrateRequirement(problem.name)
|
||||
elif isinstance(problem, MissingSetupPyCommand):
|
||||
if problem.command == "test":
|
||||
return PythonPackageRequirement("setuptools")
|
||||
|
@ -221,6 +227,9 @@ def problem_to_upstream_requirement(problem): # noqa: C901
|
|||
python_version=problem.python_version,
|
||||
minimum_version=problem.minimum_version,
|
||||
)
|
||||
elif isinstance(problem, UnsatisfiedDependencies):
|
||||
from .resolver.apt import AptRequirement
|
||||
return AptRequirement(problem.relations)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
|
|
@ -214,8 +214,7 @@ def build_once(
|
|||
source_date_epoch=None,
|
||||
extra_repositories=None
|
||||
):
|
||||
pkg, version = get_latest_changelog_version(local_tree, subpath)
|
||||
build_log_path = os.path.join(output_directory, pkg + ".build.log")
|
||||
build_log_path = os.path.join(output_directory, "build.log")
|
||||
try:
|
||||
with open(build_log_path, "w") as f:
|
||||
build(
|
||||
|
|
Loading…
Add table
Reference in a new issue