From 096423d05a2b71a08f29826795395050646b3d5e Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Tue, 4 Jul 2023 10:28:16 +0200 Subject: [PATCH] Check dependencies.yml also --- hubcap/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hubcap/package.py b/hubcap/package.py index 55e4322..bdfbb66 100644 --- a/hubcap/package.py +++ b/hubcap/package.py @@ -41,6 +41,12 @@ def parse_pkgs(repo_dir): with open(repo_dir / Path("packages.yml"), "r") as stream: pkgs = yaml.safe_load(stream) return pkgs.get("packages", []) if pkgs else [] + # new in v1.6 + # a project can declare 'packages' in *either* packages.yml or dependencies.yml, not both + elif os.path.exists(repo_dir / "dependencies.yml"): + with open(repo_dir / Path("dependencies.yml"), "r") as stream: + pkgs = yaml.safe_load(stream) + return pkgs.get("packages", []) if pkgs else [] else: return []