diff --git a/ognibuild/buildsystem.py b/ognibuild/buildsystem.py index 52153f7..0fb28cf 100644 --- a/ognibuild/buildsystem.py +++ b/ognibuild/buildsystem.py @@ -912,6 +912,8 @@ class DistZilla(BuildSystem): out = session.check_output(["dzil", "authordeps"]) for entry in out.splitlines(): yield "build", PerlModuleRequirement(entry.decode().strip()) + if os.path.exists(os.path.join(os.path.dirname(self.path), "cpanfile")): + yield from _declared_deps_from_cpanfile(session) class RunTests(BuildSystem): @@ -942,6 +944,11 @@ def _read_cpanfile(session, args, kind): yield kind, PerlModuleRequirement(line.decode().strip()) +def _declared_deps_from_cpanfile(session): + yield from _read_cpanfile(session, ['--configure', '--build'], 'build') + yield from _read_cpanfile(session, ['--test'], 'test') + + class Make(BuildSystem): name = "make" @@ -1083,8 +1090,7 @@ class Make(BuildSystem): yield "build", PerlModuleRequirement(require) something = True if os.path.exists(os.path.join(self.path, "cpanfile")): - yield from _read_cpanfile(session, ['--configure', '--build'], 'build') - yield from _read_cpanfile(session, ['--test'], 'test') + yield from _declared_deps_from_cpanfile(session) something = True if not something: raise NotImplementedError