yauto: Add extra python dependencies as DepObjects instead of string

Signed-off-by: Thomas Staudinger <Staudi.Kaos@gmail.com>
This commit is contained in:
Thomas Staudinger 2025-01-27 19:38:58 +01:00
parent d7795c2017
commit 1bcbf56272
No known key found for this signature in database

View file

@ -164,10 +164,9 @@ class AutoPackage:
)
# Handle python modules respecting PEP517.
if "pyproject.toml" in file or "setup.cfg" in file:
self.build_deps = (
"- python-build\n - python-installer\n - python-packaging\n - "
"python-wheel"
)
self.build_deps.extend(self.extra_build_deps(["python-build", "python-installer",
"python-packaging", "python-wheel"]))
if "Makefile.PL" in file or "Build.PL" in file:
# This is a perl module
known_types.append(PERL_MODULES)
@ -274,6 +273,15 @@ class AutoPackage:
return deps
@staticmethod
def extra_build_deps(deps):
extra_deps = list()
for entry in deps:
dep = DepObject()
dep.name = entry
extra_deps.append(dep)
return extra_deps
def create_yaml(self):
"""Attempt creation of a package.yml..."""
with open("package.yml", "w") as yml: