-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ifexgen_dbus command and required dependencies
l. ifexgen_dbus is a frontend / executable command, defined in the package information (setup.py) and which calls the actual code. I just followed the same pattern as for ifexgen. 2. Rename D-Bus (correct spelling) to DBus (wrong spelling) because...python reasons :( Signed-off-by: Gunnar Andersson <gunnar_dev@[email protected]>
- Loading branch information
Gunnar Andersson
committed
Aug 15, 2023
1 parent
54ff60a
commit 54cb2f9
Showing
6 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2023 MBition GmbH. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
# User-invocation script for D-Bus generation | ||
# (small wrapper around the main implementation) | ||
|
||
from ifex.model.ifex_parser import get_ast_from_yaml_file | ||
from ifex.generators.DBus import dbus_generator | ||
import argparse, dacite | ||
|
||
def ifex_dbus_generator_run(): | ||
parser = argparse.ArgumentParser(description='Runs IFEX to D-Bus XML translator.') | ||
parser.add_argument('input', metavar='ifex-input-file', type=str, help='path to input IFEX (YAML) file') | ||
|
||
try: | ||
args = parser.parse_args() | ||
dbus_generator.main_generate(args.input) | ||
|
||
except dacite.UnexpectedDataError as e: | ||
print(f"ERROR: Read error resulting from {filename}: {e}") | ||
|
||
if __name__ == "__main__": | ||
ifex_dbus_generator_run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
attrs==22.1.0 | ||
iniconfig==1.1.1 | ||
Jinja2==3.1.2 | ||
lxml | ||
MarkupSafe==2.1.1 | ||
packaging==21.3 | ||
pluggy==1.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters