diff --git a/.gitignore b/.gitignore index e98fe896f..8028c98fb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ build *.warnings *.pyc /offline-tools/ +*.egg-info +/misc/config_tools/dist diff --git a/misc/config_tools/LICENSE b/misc/config_tools/LICENSE new file mode 120000 index 000000000..30cff7403 --- /dev/null +++ b/misc/config_tools/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/misc/config_tools/README b/misc/config_tools/README deleted file mode 100644 index eac74ecf7..000000000 --- a/misc/config_tools/README +++ /dev/null @@ -1,7 +0,0 @@ -folder structure - - board_inspector : Get target board information under native Linux environment and generate board_info XML. - board_config : Parse board_info XML and scenario XML to generate board related configuration files under misc/acrn-config/xmls/board-xmls/ folder. - scenario_config : Parse board_info XML and scenario XML to generate scenario based VM configuration files under misc/acrn-config/xmls/config-xmls/$(BOARD)/ folder. - launch_config : Parse board_info XML, scenario XML and devicemodel param XML to generate launch script for post-launched vm under misc/acrn-config/xmls/config-xmls/$(BOARD)/ folder. - library : The folder stores shared software modules or libs for acrn-config offline tool. diff --git a/misc/config_tools/README.md b/misc/config_tools/README.md new file mode 100644 index 000000000..66c8eb4d7 --- /dev/null +++ b/misc/config_tools/README.md @@ -0,0 +1,10 @@ +# Supporting libraries of ACRN configuration toolset + +This package contains the libraries supporting ACRN configuration toolset, including: + +* The manipulators and validators of scenario schemas or XMLs +* The generator of guest ACPI tables + +The main objective of this package is to ease the import of the supporting libraries in the ACRN configurator which uses +a Python interpreter built in WebAssembly (WASM). This package is thus NOT intended to be used by users; invoke the +Python scripts directly if needed. diff --git a/misc/config_tools/pyproject.toml b/misc/config_tools/pyproject.toml new file mode 100644 index 000000000..404db610e --- /dev/null +++ b/misc/config_tools/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel", +] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/misc/config_tools/scenario_config/__init__.py b/misc/config_tools/scenario_config/__init__.py new file mode 100644 index 000000000..23ac0b791 --- /dev/null +++ b/misc/config_tools/scenario_config/__init__.py @@ -0,0 +1,8 @@ +# Copyright (C) 2022 Intel Corporation. +# +# SPDX-License-Identifier: BSD-3-Clause +# + +# The __init__.py for packaging. +import sys, os +sys.path.append(os.path.dirname(os.path.realpath(__file__))) diff --git a/misc/config_tools/setup.cfg b/misc/config_tools/setup.cfg new file mode 100644 index 000000000..7408d88ea --- /dev/null +++ b/misc/config_tools/setup.cfg @@ -0,0 +1,25 @@ +[metadata] +name = acrn-config-tools +version = 3.0 +author = Intel +author_email = acrn-dev@lists.projectacrn.org +description = Supporting libraries of ACRN configuration toolset +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/projectacrn/acrn-hypervisor +project_urls = + Bug Tracker = https://github.com/projectacrn/acrn-hypervisor/issues +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: BSD-3-Clause License + Operating System :: OS Independent + Private :: Do Not Upload + +[options] +package_dir = + = . +packages = find: +python_requires = >=3.6 + +[options.packages.find] +where = .