From 5b872c10a318a6d0ef97d31d79c4dbb178d2c1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Wed, 17 Mar 2021 03:15:45 +0000 Subject: [PATCH] Pass in subpath. --- ognibuild/debian/fix_build.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ognibuild/debian/fix_build.py b/ognibuild/debian/fix_build.py index 8fb6c7e..62170fd 100644 --- a/ognibuild/debian/fix_build.py +++ b/ognibuild/debian/fix_build.py @@ -297,8 +297,8 @@ def commit_debian_changes( return True -def targeted_python_versions(tree: Tree) -> Set[str]: - with tree.get_file("debian/control") as f: +def targeted_python_versions(tree: Tree, subpath: str) -> Set[str]: + with tree.get_file(os.path.join(subpath, "debian/control")) as f: control = Deb822(f) build_depends = PkgRelation.parse_relations(control.get("Build-Depends", "")) all_build_deps: Set[str] = set() @@ -315,7 +315,7 @@ def targeted_python_versions(tree: Tree) -> Set[str]: def fix_missing_python_distribution(error, context): # noqa: C901 - targeted = targeted_python_versions(context.tree) + targeted = targeted_python_versions(context.tree, context.subpath) default = not targeted pypy_pkg = context.apt.get_package_for_paths( @@ -381,7 +381,7 @@ def fix_missing_python_distribution(error, context): # noqa: C901 def fix_missing_python_module(error, context): if getattr(context, "tree", None) is not None: - targeted = targeted_python_versions(context.tree) + targeted = targeted_python_versions(context.tree, context.subpath) else: targeted = set() default = not targeted