Install dzil if it is missing.

This commit is contained in:
Jelmer Vernooij 2021-03-26 02:20:30 +00:00
parent 4237745197
commit 4a8d514f13
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
2 changed files with 5 additions and 5 deletions

View file

@ -44,7 +44,7 @@ from .requirements import (
GoRequirement,
GoPackageRequirement,
)
from .fix_build import run_with_build_fixers
from .fix_build import run_with_build_fixers, run_detecting_problems
from .session import which
@ -909,9 +909,9 @@ class DistZilla(BuildSystem):
return cls(os.path.join(path, "dist.ini"))
def get_declared_dependencies(self, session, fixers=None):
out = session.check_output(["dzil", "authordeps"])
for entry in out.splitlines():
yield "build", PerlModuleRequirement(entry.decode().strip())
lines = run_with_build_fixers(session, ["dzil", "authordeps"], fixers)
for entry in lines:
yield "build", PerlModuleRequirement(entry.strip())
if os.path.exists(os.path.join(os.path.dirname(self.path), "cpanfile")):
yield from _declared_deps_from_cpanfile(session)

View file

@ -54,7 +54,7 @@ def run_detecting_problems(session: Session, args: List[str], **kwargs):
retcode = 1
else:
if retcode == 0:
return
return contents
lines = ''.join(contents).splitlines(False)
match, error = find_build_failure_description(lines)
if error is None: