pyEDAA.CLITool 0.3.11__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/PKG-INFO +36 -38
  2. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/README.md +3 -3
  3. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/GHDL.py +22 -5
  4. pyedaa_clitool-0.4.2/pyEDAA/CLITool/NVC.py +346 -0
  5. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/__init__.py +1 -1
  6. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA.CLITool.egg-info/PKG-INFO +36 -38
  7. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA.CLITool.egg-info/SOURCES.txt +1 -0
  8. pyedaa_clitool-0.4.2/pyEDAA.CLITool.egg-info/requires.txt +44 -0
  9. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyproject.toml +2 -3
  10. pyedaa_clitool-0.3.11/pyEDAA.CLITool.egg-info/requires.txt +0 -46
  11. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/LICENSE.md +0 -0
  12. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Aldec/ActiveHDL.py +0 -0
  13. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Aldec/RivieraPRO.py +0 -0
  14. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Aldec/__init__.py +0 -0
  15. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Docker.py +0 -0
  16. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/GTKWave.py +0 -0
  17. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/IntelFPGA/Quartus.py +0 -0
  18. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/IntelFPGA/__init__.py +0 -0
  19. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Lattice/Diamond.py +0 -0
  20. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Lattice/__init__.py +0 -0
  21. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Mentor/ModelSim.py +0 -0
  22. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Mentor/__init__.py +0 -0
  23. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Xilinx/ISE.py +0 -0
  24. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Xilinx/Vivado.py +0 -0
  25. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/Xilinx/__init__.py +0 -0
  26. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA/CLITool/py.typed +0 -0
  27. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA.CLITool.egg-info/dependency_links.txt +0 -0
  28. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/pyEDAA.CLITool.egg-info/top_level.txt +0 -0
  29. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/setup.cfg +0 -0
  30. {pyedaa_clitool-0.3.11 → pyedaa_clitool-0.4.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyEDAA.CLITool
3
- Version: 0.3.11
3
+ Version: 0.4.2
4
4
  Summary: An abstraction layer of EDA CLI tools.
5
5
  Home-page: https://GitHub.com/edaa-org/pyEDAA.CLITool
6
6
  Author: Patrick Lehmann
@@ -24,49 +24,47 @@ Classifier: Development Status :: 4 - Beta
24
24
  Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.md
27
- Requires-Dist: pyTooling~=8.10
28
- Requires-Dist: pyVHDLModel~=0.33.0
27
+ Requires-Dist: pyTooling~=8.15
28
+ Requires-Dist: pyVHDLModel~=0.36.0
29
29
  Provides-Extra: doc
30
- Requires-Dist: pyTooling~=8.10; extra == "doc"
31
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "doc"
32
- Requires-Dist: docutils~=0.21.0; extra == "doc"
33
- Requires-Dist: sphinx_rtd_theme~=3.0; extra == "doc"
30
+ Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "doc"
34
31
  Requires-Dist: autoapi>=2.0.1; extra == "doc"
35
- Requires-Dist: sphinx_reports~=0.9.0; extra == "doc"
36
- Requires-Dist: sphinx_design~=0.6.0; extra == "doc"
32
+ Requires-Dist: sphinx_reports~=0.11.0; extra == "doc"
33
+ Requires-Dist: sphinx_autodoc_typehints~=3.12; extra == "doc"
34
+ Requires-Dist: sphinx_rtd_theme~=3.1; extra == "doc"
35
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
37
36
  Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
38
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "doc"
39
- Requires-Dist: sphinx~=8.2; extra == "doc"
40
- Requires-Dist: sphinx_autodoc_typehints~=3.5; extra == "doc"
41
- Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "doc"
37
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "doc"
38
+ Requires-Dist: sphinx_design~=0.7.0; extra == "doc"
39
+ Requires-Dist: sphinx~=9.1; extra == "doc"
40
+ Requires-Dist: pyTooling~=8.15; extra == "doc"
42
41
  Provides-Extra: test
43
- Requires-Dist: pyTooling~=8.10; extra == "test"
44
- Requires-Dist: mypy[reports]~=1.19; extra == "test"
45
- Requires-Dist: lxml<7.0,>=5.4; extra == "test"
42
+ Requires-Dist: Coverage~=7.14; extra == "test"
46
43
  Requires-Dist: pytest~=9.0; extra == "test"
47
- Requires-Dist: pytest-cov~=7.0; extra == "test"
48
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "test"
49
- Requires-Dist: Coverage~=7.13; extra == "test"
50
44
  Requires-Dist: typing_extensions~=4.15; extra == "test"
45
+ Requires-Dist: mypy[reports]~=2.1; extra == "test"
46
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "test"
47
+ Requires-Dist: pytest-cov~=7.1; extra == "test"
48
+ Requires-Dist: lxml<7.0,>=6.1; extra == "test"
49
+ Requires-Dist: pyTooling~=8.15; extra == "test"
51
50
  Provides-Extra: all
52
- Requires-Dist: pyTooling~=8.10; extra == "all"
53
- Requires-Dist: mypy[reports]~=1.19; extra == "all"
54
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "all"
55
- Requires-Dist: sphinx_rtd_theme~=3.0; extra == "all"
56
- Requires-Dist: docutils~=0.21.0; extra == "all"
57
- Requires-Dist: autoapi>=2.0.1; extra == "all"
58
- Requires-Dist: sphinx_reports~=0.9.0; extra == "all"
59
- Requires-Dist: sphinx_design~=0.6.0; extra == "all"
60
- Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
61
- Requires-Dist: lxml<7.0,>=5.4; extra == "all"
51
+ Requires-Dist: Coverage~=7.14; extra == "all"
62
52
  Requires-Dist: pytest~=9.0; extra == "all"
63
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "all"
64
- Requires-Dist: pytest-cov~=7.0; extra == "all"
65
- Requires-Dist: sphinx~=8.2; extra == "all"
66
- Requires-Dist: sphinx_autodoc_typehints~=3.5; extra == "all"
67
- Requires-Dist: Coverage~=7.13; extra == "all"
53
+ Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
54
+ Requires-Dist: autoapi>=2.0.1; extra == "all"
55
+ Requires-Dist: sphinx_reports~=0.11.0; extra == "all"
68
56
  Requires-Dist: typing_extensions~=4.15; extra == "all"
69
- Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "all"
57
+ Requires-Dist: sphinx_autodoc_typehints~=3.12; extra == "all"
58
+ Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
59
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "all"
60
+ Requires-Dist: mypy[reports]~=2.1; extra == "all"
61
+ Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
62
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "all"
63
+ Requires-Dist: sphinx_design~=0.7.0; extra == "all"
64
+ Requires-Dist: pytest-cov~=7.1; extra == "all"
65
+ Requires-Dist: lxml<7.0,>=6.1; extra == "all"
66
+ Requires-Dist: sphinx~=9.1; extra == "all"
67
+ Requires-Dist: pyTooling~=8.15; extra == "all"
70
68
  Dynamic: author
71
69
  Dynamic: author-email
72
70
  Dynamic: classifier
@@ -86,11 +84,11 @@ Dynamic: summary
86
84
  <a title="edaa-org.github.io/pyEDAA.CLITool" href="https://edaa-org.github.io/pyEDAA.CLITool"><img height="80px" src="doc/_static/logo.svg"/></a>
87
85
  </p>
88
86
 
89
- [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
87
+ [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
90
88
  [![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.CLITool?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)
91
89
  [![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.CLITool&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.CLITool%2Findex.html)](https://edaa-org.github.io/pyEDAA.CLITool/)
92
- [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)
93
- [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
90
+ [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](doc/Doc-License.rst)
91
+ [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
94
92
  [![PyPI](https://img.shields.io/pypi/v/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.CLITool/)
95
93
  ![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
96
94
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
@@ -2,11 +2,11 @@
2
2
  <a title="edaa-org.github.io/pyEDAA.CLITool" href="https://edaa-org.github.io/pyEDAA.CLITool"><img height="80px" src="doc/_static/logo.svg"/></a>
3
3
  </p>
4
4
 
5
- [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
5
+ [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
6
6
  [![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.CLITool?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)
7
7
  [![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.CLITool&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.CLITool%2Findex.html)](https://edaa-org.github.io/pyEDAA.CLITool/)
8
- [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)
9
- [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
8
+ [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](doc/Doc-License.rst)
9
+ [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
10
10
  [![PyPI](https://img.shields.io/pypi/v/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.CLITool/)
11
11
  ![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
12
12
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
@@ -50,13 +50,26 @@ from pyEDAA.CLITool import CLIToolException
50
50
 
51
51
  @export
52
52
  class GHDLVersion(metaclass=ExtendedType, slots=True):
53
+ """
54
+
55
+ .. code-block::
56
+
57
+ GHDL 6.0.0-dev (4.1.0.r1065.gd3ea86f11.dirty) [Dunoon edition]
58
+ Compiled with GNAT Version: 15.2.0
59
+ static elaboration, mcode JIT code generator
60
+ Written by Tristan Gingold.
61
+
62
+ Copyright (C) 2003 - 2025 Tristan Gingold.
63
+ GHDL is free software, covered by the GNU General Public License. There is NO
64
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
65
+ """
53
66
  _major: int
54
67
  _minor: int
55
68
  _micro: int
56
- _dev: bool
69
+ _dev: bool
57
70
  _commitsSinceLastTag: int
58
71
  _gitHash: str
59
- _dirty: bool
72
+ _dirty: bool
60
73
  _edition: str
61
74
  _gnatCompiler: Tuple[int, int, int]
62
75
  _backend: str
@@ -159,6 +172,10 @@ class GHDLVersion(metaclass=ExtendedType, slots=True):
159
172
  def Edition(self) -> str:
160
173
  return self._edition
161
174
 
175
+ @property
176
+ def Backend(self) -> str:
177
+ return self._backend
178
+
162
179
  def __str__(self) -> str:
163
180
  dev = f"-dev" if self._dev else ""
164
181
  return f"{self._major}.{self._minor}.{self._micro}{dev}"
@@ -247,7 +264,7 @@ class GHDL(Executable):
247
264
 
248
265
  def __init__(self, value: VHDLVersion):
249
266
  if value is None:
250
- raise ValueError(f"") # XXX: add message
267
+ raise ValueError(f"") # FIXME: add message
251
268
 
252
269
  self._value = value
253
270
 
@@ -258,13 +275,13 @@ class GHDL(Executable):
258
275
  @Value.setter
259
276
  def Value(self, value: VHDLVersion) -> None:
260
277
  if value is None:
261
- raise ValueError(f"") # XXX: add message
278
+ raise ValueError(f"") # FIXME: add message
262
279
 
263
280
  self._value = value
264
281
 
265
282
  def AsArgument(self) -> Union[str, Iterable[str]]:
266
283
  if self._name is None:
267
- raise ValueError(f"") # XXX: add message
284
+ raise ValueError(f"") # FIXME: add message
268
285
 
269
286
  return self._pattern.format(self._name, str(self._value)[-2:])
270
287
 
@@ -0,0 +1,346 @@
1
+ # ==================================================================================================================== #
2
+ # _____ ____ _ _ ____ _ ___ _____ _ #
3
+ # _ __ _ _| ____| _ \ / \ / \ / ___| | |_ _|_ _|__ ___ | | #
4
+ # | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | |/ _ \ / _ \| | #
5
+ # | |_) | |_| | |___| |_| / ___ \ / ___ \ | |___| |___ | | | | (_) | (_) | | #
6
+ # | .__/ \__, |_____|____/_/ \_\/_/ \_(_)____|_____|___| |_|\___/ \___/|_| #
7
+ # |_| |___/ #
8
+ # ==================================================================================================================== #
9
+ # Authors: #
10
+ # Patrick Lehmann #
11
+ # #
12
+ # License: #
13
+ # ==================================================================================================================== #
14
+ # Copyright 2025-2026 Patrick Lehmann - Boetzingen, Germany #
15
+ # #
16
+ # Licensed under the Apache License, Version 2.0 (the "License"); #
17
+ # you may not use this file except in compliance with the License. #
18
+ # You may obtain a copy of the License at #
19
+ # #
20
+ # http://www.apache.org/licenses/LICENSE-2.0 #
21
+ # #
22
+ # Unless required by applicable law or agreed to in writing, software #
23
+ # distributed under the License is distributed on an "AS IS" BASIS, #
24
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
25
+ # See the License for the specific language governing permissions and #
26
+ # limitations under the License. #
27
+ # #
28
+ # SPDX-License-Identifier: Apache-2.0 #
29
+ # ==================================================================================================================== #
30
+ #
31
+ """This module contains the CLI abstraction layer for `NVC <https://github.com/nickg/nvc>`__."""
32
+ from re import search as re_search
33
+ from typing import Union, Iterable, Optional as Nullable
34
+
35
+ from pyTooling.Decorators import export
36
+ from pyTooling.MetaClasses import ExtendedType
37
+ from pyVHDLModel import VHDLVersion
38
+
39
+ from pyTooling.CLIAbstraction import CLIArgument, Executable
40
+ from pyTooling.CLIAbstraction.Argument import PathListArgument, StringArgument
41
+ from pyTooling.CLIAbstraction.Command import LongCommand
42
+ from pyTooling.CLIAbstraction.Flag import ShortFlag, LongFlag
43
+ from pyTooling.CLIAbstraction.BooleanFlag import LongBooleanFlag
44
+ from pyTooling.CLIAbstraction.ValuedFlag import ShortValuedFlag, LongValuedFlag
45
+ from pyTooling.CLIAbstraction.ValuedTupleFlag import LongTupleFlag, ShortTupleFlag
46
+ from pyTooling.CLIAbstraction.KeyValueFlag import ShortKeyValueFlag, LongKeyValueFlag
47
+
48
+ from pyEDAA.CLITool import CLIToolException
49
+
50
+
51
+ @export
52
+ class NVCVersion(metaclass=ExtendedType, slots=True):
53
+ """
54
+
55
+ .. code-block::
56
+
57
+ nvc 1.18.2 (1.18.2.r0.g8893318a) (Using LLVM 21.1.5)
58
+ Copyright (C) 2011-2025 Nick Gasson
59
+ This program comes with ABSOLUTELY NO WARRANTY. This is free software, and
60
+ you are welcome to redistribute it under certain conditions. See the GNU
61
+ General Public Licence for details.
62
+ """
63
+ _major: int
64
+ _minor: int
65
+ _micro: int
66
+ # _dev: bool
67
+ _commitsSinceLastTag: int
68
+ _gitHash: str
69
+ _backend: str
70
+
71
+ VERSION_LINE_PATTERN = (
72
+ r"nvc"
73
+ r"\s(?P<Major>\d+)\.(?P<Minor>\d+)\.(?P<Micro>\d+)(?:-(?P<Suffix>dev|rc\d+))?"
74
+ r"\s\((?:"
75
+ r"(?:"
76
+ r"(?P<major2>\d+)\.(?P<minor2>\d+)\.(?P<micro2>\d+)\.(?:r(?P<cslt>\d+))\.(?:g(?P<Hash>[0-9a-f]+))(?:\.(?P<Dirty>dirty))?"
77
+ r")|(?:"
78
+ r"(?P<Hash2>[0-9a-f]{7})"
79
+ r")"
80
+ r")\)"
81
+ r"\s\(Using (?P<Backend>\w+) (?P<BackendMajor>\d+)\.(?P<BackendMinor>\d+)\.(?P<BackendMicro>\d+)\)"
82
+ )
83
+
84
+ def __init__(self, versionLine: str) -> None:
85
+ match = re_search("^" + self.VERSION_LINE_PATTERN + "$", versionLine)
86
+ if match is None:
87
+ raise CLIToolException(f"Unknown NVC version string '{versionLine}'.")
88
+
89
+ self._major = int(match["Major"])
90
+ self._minor = int(match["Minor"])
91
+ self._micro = int(match["Micro"])
92
+ # if (suffix := match["Suffix"]) is not None:
93
+ # self._dev = suffix == "dev"
94
+ # else:
95
+ # self._dev = False
96
+ if (cslt := match["cslt"]) is not None:
97
+ self._commitsSinceLastTag = int(cslt)
98
+ else:
99
+ self._commitsSinceLastTag = 0
100
+ self._gitHash = match["Hash"] if match["Hash"] is not None else match["Hash2"]
101
+ self._backend = match["Backend"]
102
+
103
+ @property
104
+ def Major(self) -> int:
105
+ return self._major
106
+
107
+ @property
108
+ def Minor(self) -> int:
109
+ return self._minor
110
+
111
+ @property
112
+ def Micro(self) -> int:
113
+ return self._micro
114
+
115
+ @property
116
+ def CommitsSinceLastTag(self) -> int:
117
+ return self._commitsSinceLastTag
118
+
119
+ @property
120
+ def GitHash(self) -> str:
121
+ return self._gitHash
122
+
123
+ @property
124
+ def Dirty(self) -> bool:
125
+ return self._dirty
126
+
127
+ @property
128
+ def Backend(self) -> str:
129
+ return self._backend
130
+
131
+ def __str__(self) -> str:
132
+ # dev = f"-dev" if self._dev else ""
133
+ return f"{self._major}.{self._minor}.{self._micro}" # {dev}"
134
+
135
+ def __repr__(self) -> str:
136
+ return f"{self.__str__()} (Backend: {self._backend}; Git: {self._gitHash})"
137
+
138
+
139
+ @export
140
+ class NVC(Executable):
141
+ _executableNames = {
142
+ "Darwin": "nvc",
143
+ "FreeBSD": "nvc",
144
+ "Linux": "nvc",
145
+ "Windows": "nvc.exe"
146
+ }
147
+
148
+ @CLIArgument()
149
+ class CommandHelp(LongCommand, name="help"):
150
+ """Display usage summary."""
151
+
152
+ @CLIArgument()
153
+ class CommandVersion(LongCommand, name="version"):
154
+ """Display version and copyright information."""
155
+
156
+ @CLIArgument()
157
+ class FlagSimulationHeapSize(ShortTupleFlag, name="H"):
158
+ """
159
+ Set the maximum size in bytes of the simulation heap. This area of memory is used for temporary allocations during
160
+ process execution and dynamic allocations by the VHDL ‘new’ operator. The size parameter takes an optional k, m, or
161
+ g suffix to indicate kilobytes, megabytes, and gigabytes respectively. The default size is 16 megabytes.
162
+ """
163
+
164
+ @CLIArgument()
165
+ class FlagIEEEWarnings(LongValuedFlag, name="ieee-warnings"):
166
+ """
167
+ Enable or disable warning messages from the standard IEEE packages. The off-at-0 option disables warnings in the
168
+ first time step only. The default is warnings enabled.
169
+ """
170
+
171
+ @CLIArgument()
172
+ class FlagIgnoreTime(LongFlag, name="ignore-time"):
173
+ """
174
+ Do not check the timestamps of source files when the corresponding design unit is loaded from a library.
175
+ """
176
+
177
+ @CLIArgument()
178
+ class FlagLibrarySearchPath(ShortTupleFlag, name="L"):
179
+ """
180
+ Add path to the list of directories to search for libraries. See the LIBRARIES section below for details.
181
+ """
182
+
183
+ @CLIArgument()
184
+ class FlagMaxMemorySize(ShortTupleFlag, name="M"):
185
+ """
186
+ Set the maximum amount of memory in bytes used for the internal representations of design units. The default is
187
+ 16 megabytes but this may be insufficient when elaborating a large design. The size parameter takes an optional k,
188
+ m, or g suffix to indicate kilobytes, megabytes, and gigabytes respectively. For example -M64m for 64 megabytes.
189
+ """
190
+
191
+ @CLIArgument()
192
+ class FlagLibraryMapping(LongKeyValueFlag, name="map", pattern="--{0}={1}:{2}"):
193
+ """
194
+ Specify exactly the location of the logical library name. Libraries mapped in this way will not use the normal
195
+ search path.
196
+ """
197
+
198
+ @CLIArgument()
199
+ class FlagMessages(LongValuedFlag, name="messages"):
200
+ """
201
+ Select the format used for printing error and informational messages. The default full message format is designed
202
+ for readability whereas the compact messages can be easily parsed by tools.
203
+ """
204
+
205
+ @CLIArgument()
206
+ class FlagRandomSeed(LongValuedFlag, name="seed"):
207
+ """
208
+ Seed for random number generation. Affects the ‘get_random’ function in the ‘nvc.random’ package, the ``--shuffle``
209
+ option, and PSL union expressions.
210
+ """
211
+
212
+ @CLIArgument()
213
+ class FlagVHDLStandard(LongValuedFlag, name="std"):
214
+ """
215
+ Select the VHDL standard revision to use. VHDL standard revisions are commonly referred to by the year they were
216
+ published. For example IEEE 1076-1993 is known as VHDL-93. Specify either the full year such as 1993 or just the
217
+ last two digits such as ``93``. The accepted revisions are 1993, 2000, 2002, 2008, 2019. Note there is very limited
218
+ supported VHDL-2019 at present and VHDL-87 is not supported. The default standard revision is VHDL-2008.
219
+ """
220
+ _value: VHDLVersion
221
+
222
+ def __init__(self, value: VHDLVersion):
223
+ if value is None:
224
+ raise ValueError(f"") # FIXME: add message
225
+
226
+ self._value = value
227
+
228
+ @property
229
+ def Value(self) -> VHDLVersion:
230
+ return self._value
231
+
232
+ @Value.setter
233
+ def Value(self, value: VHDLVersion) -> None:
234
+ if value is None:
235
+ raise ValueError(f"") # FIXME: add message
236
+
237
+ self._value = value
238
+
239
+ def AsArgument(self) -> Union[str, Iterable[str]]:
240
+ if self._name is None:
241
+ raise ValueError(f"") # FIXME: add message
242
+
243
+ return self._pattern.format(self._name, str(self._value)[-2:])
244
+
245
+ @CLIArgument()
246
+ class FlagRandomSeed(LongValuedFlag, name="stderr"):
247
+ """
248
+ Print error messages with the given severity or higher to ‘stderr’ instead of ‘stdout’. The default is to print all
249
+ messages to ‘stderr’. Valid levels are note, warning, error, failure, and none.
250
+ """
251
+
252
+ @CLIArgument()
253
+ class FlagLibrary(LongValuedFlag, name="work"):
254
+ """
255
+ Use name as the work library. The second variant explicitly specifies the location of the library.
256
+ """
257
+
258
+ @CLIArgument()
259
+ class CommandTCLScript(LongTupleFlag, name="do"):
260
+ """
261
+ Evaluate a batch TCL script, optionally with *unit* loaded.
262
+ """
263
+
264
+ @CLIArgument()
265
+ class CommandAnalyze(ShortFlag, name="a"):
266
+ """Analyze VHDL source file(s)."""
267
+
268
+ @CLIArgument()
269
+ class OptionPaths(PathListArgument):
270
+ """Add list of VHDL files to analyze."""
271
+
272
+ @CLIArgument()
273
+ class FlagRelaxed(LongFlag, name="relaxed"):
274
+ """Relax some LRM rules."""
275
+
276
+ @CLIArgument()
277
+ class CommandElaborate(ShortTupleFlag, name="e"):
278
+ """Elaborate design."""
279
+
280
+ @CLIArgument()
281
+ class CommandRun(ShortTupleFlag, name="r"):
282
+ """Simulate design."""
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+ def _CopyParameters(self, tool: "NVC") -> None:
291
+ for key in self.__cliParameters__:
292
+ if self._NeedsParameterInitialization(key):
293
+ value = self.__cliParameters__[key].Value
294
+ tool.__cliParameters__[key] = key(value)
295
+ else:
296
+ tool.__cliParameters__[key] = key()
297
+
298
+ def _SetParameters(self, tool: "NVC", std: Nullable[VHDLVersion] = None):
299
+ if std is not None:
300
+ tool[self.FlagVHDLStandard] = str(std)
301
+
302
+ def GetNVCAsAnalyzer(self, std: Nullable[VHDLVersion] = None) -> "NVC":
303
+ tool = NVC(executablePath=self._executablePath)
304
+
305
+ tool[tool.CommandAnalyze] = True
306
+ self._CopyParameters(tool)
307
+ self._SetParameters(tool, std)
308
+
309
+ return tool
310
+
311
+ def GetNVCAsElaborator(self, std: Nullable[VHDLVersion] = None) -> "NVC":
312
+ tool = NVC(executablePath=self._executablePath)
313
+
314
+ tool[tool.CommandElaborate] = True
315
+ self._CopyParameters(tool)
316
+ self._SetParameters(tool, std)
317
+
318
+ return tool
319
+
320
+ def GetNVCAsSimulator(self, std: Nullable[VHDLVersion] = None) -> "NVC":
321
+ tool = NVC(executablePath=self._executablePath)
322
+
323
+ tool[tool.CommandRun] = True
324
+ self._CopyParameters(tool)
325
+ self._SetParameters(tool, std)
326
+
327
+ return tool
328
+
329
+ def Help(self) -> str:
330
+ tool = NVC(executablePath=self._executablePath)
331
+
332
+ tool[tool.CommandHelp] = True
333
+
334
+ tool.StartProcess()
335
+ return "\n".join(tool.GetLineReader())
336
+
337
+ def Version(self) -> NVCVersion:
338
+ tool = NVC(executablePath=self._executablePath)
339
+
340
+ tool[tool.CommandVersion] = True
341
+
342
+ tool.StartProcess()
343
+ iterator = iter(tool.GetLineReader())
344
+ firstLine = next(iterator)
345
+
346
+ return NVCVersion(firstLine)
@@ -34,7 +34,7 @@ __author__ = "Patrick Lehmann"
34
34
  __email__ = "Paebbels@gmail.com"
35
35
  __copyright__ = "2014-2026, Patrick Lehmann, Unai Martinez-Corral"
36
36
  __license__ = "Apache License, Version 2.0"
37
- __version__ = "0.3.11"
37
+ __version__ = "0.4.2"
38
38
  __keywords__ = ["cli", "abstraction layer", "eda"]
39
39
 
40
40
  from pathlib import Path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyEDAA.CLITool
3
- Version: 0.3.11
3
+ Version: 0.4.2
4
4
  Summary: An abstraction layer of EDA CLI tools.
5
5
  Home-page: https://GitHub.com/edaa-org/pyEDAA.CLITool
6
6
  Author: Patrick Lehmann
@@ -24,49 +24,47 @@ Classifier: Development Status :: 4 - Beta
24
24
  Requires-Python: >=3.11
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.md
27
- Requires-Dist: pyTooling~=8.10
28
- Requires-Dist: pyVHDLModel~=0.33.0
27
+ Requires-Dist: pyTooling~=8.15
28
+ Requires-Dist: pyVHDLModel~=0.36.0
29
29
  Provides-Extra: doc
30
- Requires-Dist: pyTooling~=8.10; extra == "doc"
31
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "doc"
32
- Requires-Dist: docutils~=0.21.0; extra == "doc"
33
- Requires-Dist: sphinx_rtd_theme~=3.0; extra == "doc"
30
+ Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "doc"
34
31
  Requires-Dist: autoapi>=2.0.1; extra == "doc"
35
- Requires-Dist: sphinx_reports~=0.9.0; extra == "doc"
36
- Requires-Dist: sphinx_design~=0.6.0; extra == "doc"
32
+ Requires-Dist: sphinx_reports~=0.11.0; extra == "doc"
33
+ Requires-Dist: sphinx_autodoc_typehints~=3.12; extra == "doc"
34
+ Requires-Dist: sphinx_rtd_theme~=3.1; extra == "doc"
35
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
37
36
  Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
38
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "doc"
39
- Requires-Dist: sphinx~=8.2; extra == "doc"
40
- Requires-Dist: sphinx_autodoc_typehints~=3.5; extra == "doc"
41
- Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "doc"
37
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "doc"
38
+ Requires-Dist: sphinx_design~=0.7.0; extra == "doc"
39
+ Requires-Dist: sphinx~=9.1; extra == "doc"
40
+ Requires-Dist: pyTooling~=8.15; extra == "doc"
42
41
  Provides-Extra: test
43
- Requires-Dist: pyTooling~=8.10; extra == "test"
44
- Requires-Dist: mypy[reports]~=1.19; extra == "test"
45
- Requires-Dist: lxml<7.0,>=5.4; extra == "test"
42
+ Requires-Dist: Coverage~=7.14; extra == "test"
46
43
  Requires-Dist: pytest~=9.0; extra == "test"
47
- Requires-Dist: pytest-cov~=7.0; extra == "test"
48
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "test"
49
- Requires-Dist: Coverage~=7.13; extra == "test"
50
44
  Requires-Dist: typing_extensions~=4.15; extra == "test"
45
+ Requires-Dist: mypy[reports]~=2.1; extra == "test"
46
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "test"
47
+ Requires-Dist: pytest-cov~=7.1; extra == "test"
48
+ Requires-Dist: lxml<7.0,>=6.1; extra == "test"
49
+ Requires-Dist: pyTooling~=8.15; extra == "test"
51
50
  Provides-Extra: all
52
- Requires-Dist: pyTooling~=8.10; extra == "all"
53
- Requires-Dist: mypy[reports]~=1.19; extra == "all"
54
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "all"
55
- Requires-Dist: sphinx_rtd_theme~=3.0; extra == "all"
56
- Requires-Dist: docutils~=0.21.0; extra == "all"
57
- Requires-Dist: autoapi>=2.0.1; extra == "all"
58
- Requires-Dist: sphinx_reports~=0.9.0; extra == "all"
59
- Requires-Dist: sphinx_design~=0.6.0; extra == "all"
60
- Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
61
- Requires-Dist: lxml<7.0,>=5.4; extra == "all"
51
+ Requires-Dist: Coverage~=7.14; extra == "all"
62
52
  Requires-Dist: pytest~=9.0; extra == "all"
63
- Requires-Dist: pyVHDLModel~=0.33.0; extra == "all"
64
- Requires-Dist: pytest-cov~=7.0; extra == "all"
65
- Requires-Dist: sphinx~=8.2; extra == "all"
66
- Requires-Dist: sphinx_autodoc_typehints~=3.5; extra == "all"
67
- Requires-Dist: Coverage~=7.13; extra == "all"
53
+ Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
54
+ Requires-Dist: autoapi>=2.0.1; extra == "all"
55
+ Requires-Dist: sphinx_reports~=0.11.0; extra == "all"
68
56
  Requires-Dist: typing_extensions~=4.15; extra == "all"
69
- Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "all"
57
+ Requires-Dist: sphinx_autodoc_typehints~=3.12; extra == "all"
58
+ Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
59
+ Requires-Dist: sphinx-copybutton>=0.5.2; extra == "all"
60
+ Requires-Dist: mypy[reports]~=2.1; extra == "all"
61
+ Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
62
+ Requires-Dist: pyVHDLModel~=0.36.0; extra == "all"
63
+ Requires-Dist: sphinx_design~=0.7.0; extra == "all"
64
+ Requires-Dist: pytest-cov~=7.1; extra == "all"
65
+ Requires-Dist: lxml<7.0,>=6.1; extra == "all"
66
+ Requires-Dist: sphinx~=9.1; extra == "all"
67
+ Requires-Dist: pyTooling~=8.15; extra == "all"
70
68
  Dynamic: author
71
69
  Dynamic: author-email
72
70
  Dynamic: classifier
@@ -86,11 +84,11 @@ Dynamic: summary
86
84
  <a title="edaa-org.github.io/pyEDAA.CLITool" href="https://edaa-org.github.io/pyEDAA.CLITool"><img height="80px" src="doc/_static/logo.svg"/></a>
87
85
  </p>
88
86
 
89
- [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28.svg?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
87
+ [![Sourcecode on GitHub](https://img.shields.io/badge/pyEDAA-CLITool-ffca28?longCache=true&style=flat-square&logo=github&longCache=true&logo=GitHub&labelColor=ff8f00)](https://GitHub.com/edaa-org/pyEDAA.CLITool)
90
88
  [![Sourcecode License](https://img.shields.io/pypi/l/pyEDAA.CLITool?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)
91
89
  [![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=edaa-org.github.io%2FpyEDAA.CLITool&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fedaa-org.github.io%2FpyEDAA.CLITool%2Findex.html)](https://edaa-org.github.io/pyEDAA.CLITool/)
92
- [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)
93
- [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
90
+ [![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](doc/Doc-License.rst)
91
+ [![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)
94
92
  [![PyPI](https://img.shields.io/pypi/v/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyEDAA.CLITool/)
95
93
  ![PyPI - Status](https://img.shields.io/pypi/status/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
96
94
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyEDAA.CLITool?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
@@ -10,6 +10,7 @@ pyEDAA.CLITool.egg-info/top_level.txt
10
10
  pyEDAA/CLITool/Docker.py
11
11
  pyEDAA/CLITool/GHDL.py
12
12
  pyEDAA/CLITool/GTKWave.py
13
+ pyEDAA/CLITool/NVC.py
13
14
  pyEDAA/CLITool/__init__.py
14
15
  pyEDAA/CLITool/py.typed
15
16
  pyEDAA/CLITool/Aldec/ActiveHDL.py
@@ -0,0 +1,44 @@
1
+ pyTooling~=8.15
2
+ pyVHDLModel~=0.36.0
3
+
4
+ [all]
5
+ Coverage~=7.14
6
+ pytest~=9.0
7
+ sphinxcontrib-mermaid~=2.0
8
+ autoapi>=2.0.1
9
+ sphinx_reports~=0.11.0
10
+ typing_extensions~=4.15
11
+ sphinx_autodoc_typehints~=3.12
12
+ sphinx_rtd_theme~=3.1
13
+ sphinx-copybutton>=0.5.2
14
+ mypy[reports]~=2.1
15
+ docutils_stubs~=0.0.22
16
+ pyVHDLModel~=0.36.0
17
+ sphinx_design~=0.7.0
18
+ pytest-cov~=7.1
19
+ lxml<7.0,>=6.1
20
+ sphinx~=9.1
21
+ pyTooling~=8.15
22
+
23
+ [doc]
24
+ sphinxcontrib-mermaid~=2.0
25
+ autoapi>=2.0.1
26
+ sphinx_reports~=0.11.0
27
+ sphinx_autodoc_typehints~=3.12
28
+ sphinx_rtd_theme~=3.1
29
+ sphinx-copybutton>=0.5.2
30
+ docutils_stubs~=0.0.22
31
+ pyVHDLModel~=0.36.0
32
+ sphinx_design~=0.7.0
33
+ sphinx~=9.1
34
+ pyTooling~=8.15
35
+
36
+ [test]
37
+ Coverage~=7.14
38
+ pytest~=9.0
39
+ typing_extensions~=4.15
40
+ mypy[reports]~=2.1
41
+ pyVHDLModel~=0.36.0
42
+ pytest-cov~=7.1
43
+ lxml<7.0,>=6.1
44
+ pyTooling~=8.15
@@ -1,8 +1,7 @@
1
1
  [build-system]
2
2
  requires = [
3
3
  "setuptools >= 80.0",
4
- "wheel ~= 0.45.0",
5
- "pyTooling ~= 8.10"
4
+ "pyTooling ~= 8.15"
6
5
  ]
7
6
  build-backend = "setuptools.build_meta"
8
7
 
@@ -26,7 +25,7 @@ variable-naming-style = "camelCase"
26
25
 
27
26
  [tool.mypy]
28
27
  packages = ["pyEDAA.CLITool"]
29
- python_version = "3.13"
28
+ python_version = "3.14"
30
29
  #ignore_missing_imports = true
31
30
  strict = true
32
31
  pretty = true
@@ -1,46 +0,0 @@
1
- pyTooling~=8.10
2
- pyVHDLModel~=0.33.0
3
-
4
- [all]
5
- pyTooling~=8.10
6
- mypy[reports]~=1.19
7
- sphinx-copybutton>=0.5.0
8
- sphinx_rtd_theme~=3.0
9
- docutils~=0.21.0
10
- autoapi>=2.0.1
11
- sphinx_reports~=0.9.0
12
- sphinx_design~=0.6.0
13
- docutils_stubs~=0.0.22
14
- lxml<7.0,>=5.4
15
- pytest~=9.0
16
- pyVHDLModel~=0.33.0
17
- pytest-cov~=7.0
18
- sphinx~=8.2
19
- sphinx_autodoc_typehints~=3.5
20
- Coverage~=7.13
21
- typing_extensions~=4.15
22
- sphinxcontrib-mermaid~=1.0
23
-
24
- [doc]
25
- pyTooling~=8.10
26
- sphinx-copybutton>=0.5.0
27
- docutils~=0.21.0
28
- sphinx_rtd_theme~=3.0
29
- autoapi>=2.0.1
30
- sphinx_reports~=0.9.0
31
- sphinx_design~=0.6.0
32
- docutils_stubs~=0.0.22
33
- pyVHDLModel~=0.33.0
34
- sphinx~=8.2
35
- sphinx_autodoc_typehints~=3.5
36
- sphinxcontrib-mermaid~=1.0
37
-
38
- [test]
39
- pyTooling~=8.10
40
- mypy[reports]~=1.19
41
- lxml<7.0,>=5.4
42
- pytest~=9.0
43
- pytest-cov~=7.0
44
- pyVHDLModel~=0.33.0
45
- Coverage~=7.13
46
- typing_extensions~=4.15
File without changes