pmb.helpers.frontend.kconfig: modernize (MR 2333)

Create new pmb/commands/kconfig_check.py and _edit.py files and move
related code there.
This commit is contained in:
Oliver Smith 2024-06-23 17:57:34 +02:00
parent 6f6cf1e8da
commit b6058e3569
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
4 changed files with 90 additions and 60 deletions

View file

@ -0,0 +1,21 @@
# Copyright 2024 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
from pmb import commands
import pmb.build
import pmb.helpers.args
class KConfigEdit(commands.Command):
pkgname: str
use_oldconfig: bool
def __init__(self, pkgname, use_oldconfig):
self.pkgname = pkgname
self.use_oldconfig = use_oldconfig
pass
def run(self):
args = pmb.helpers.args.please_i_really_need_args()
pmb.build.menuconfig(args, self.pkgname, self.use_oldconfig)