You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.8 KiB

# Poetry pyproject.toml: https://python-poetry.org/docs/pyproject/
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "cot_dt2c"
version = "0.1.0"
description = "CoT-dt2c Tool is a python script to convert CoT DT file into corresponding C file"
authors = ["Arm Ltd <tf-a@lists.trustedfirmware.org>"]
license = "BSD-3"
repository = "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/"
homepage = "https://trustedfirmware-a.readthedocs.io/en/latest/index.html"
# Pypi classifiers: https://pypi.org/classifiers/
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
[tool.poetry.dependencies]
python = "^3.8"
click = "^8.1.7"
plotly = "^5.23.0"
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
pydevicetree = "0.0.13"
igraph = "^0.11.6"
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
pyparsing = "^3.1.2"
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
mypy = "^0.910"
pytest = "^6.2.5"
[tool.mypy]
# https://mypy.readthedocs.io/en/latest/config_file.html#using-a-pyproject-toml-file
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
python_version = "3.8"
pretty = true
show_traceback = true
color_output = true
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
[[tool.mypy.overrides]]
module = ["igraph", "pydevicetree", "pydevicetree.ast", "plotly", "plotly.graph_objects"]
ignore_missing_imports = true
[tool.coverage.run]
source = ["tests"]
fix(cot-dt2c): fix various breakages This change fixes several breakages that were introduced in some build configurations by the introduction of the cot-dt2c tool. Some Python environments cannot be managed directly via `pip`, and invocations of `make`, including `make distclean`, would cause errors along the lines of: error: externally-managed-environment × This environment is externally managed ╰─&gt; To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. This change has been resolved by ensuring that calls to the cot-dt2c tool from the build system happen exclusively through Poetry, which automatically sets up a virtual environment that *can* be modified. Some environments saw the following error when building platforms where the cot-dt2c tool was used: make: *** No rule to make target &#39;&lt;..&gt;/debug/bl2_cot.c&#39;, needed by &#39;&lt;..&gt;/debug/bl2/bl2_cot.o&#39;. Stop. Additionally, environments with a more recent version of Python saw the following error: File &#34;&lt;...&gt;/lib/python3.12/site-packages/cot_dt2c/cot_parser.py&#34;, line 637, in img_to_c if ifdef: ^^^^^ NameError: name &#39;ifdef&#39; is not defined Both of these errors have now been resolved by modifications to the build system and the cot-dt2c tool to enable preprocessing of the device tree source file before it is processed by the tool. As a consequence of this change, the `pydevicetree` library is no longer vendored into the repository tree, and we instead pull it in via a dependency in Poetry. This change also resolves several MyPy warnings and errors related to missing type hints. Change-Id: I72b2d01caca3fcb789d3fe2549f318a9c92d77d1 Signed-off-by: Chris Kay &lt;chris.kay@arm.com&gt;
3 months ago
[tool.coverage.paths]
source = "cot_dt2c"
[tool.poetry.scripts]
# Entry points for the package https://python-poetry.org/docs/pyproject/#scripts
# "cot-dt2c" = "cot_dt2c.__main__:cli"
"cot-dt2c" = "cot_dt2c.__main__:cli"