_toolchain.yosys: fix amaranth-yosys version extractor.

This commit is contained in:
Catherine 2024-04-06 07:56:13 +00:00
parent 6857daff54
commit df589a54e0
2 changed files with 3 additions and 3 deletions

View file

@ -120,8 +120,8 @@ class _BuiltinYosys(YosysBinary):
@classmethod
def version(cls):
version = importlib_metadata.version(cls.YOSYS_PACKAGE)
match = re.match(r"^(\d+)\.(\d+)(?:\.post(\d+))?", version)
return (int(match[1]), int(match[2]), int(match[3] or 0))
match = re.match(r"^(\d+)\.(\d+)\.(?:\d+)(?:\.(\d+))?(?:\.post(\d+))?", version)
return (int(match[1]), int(match[2]), int(match[3] or 0), int(match[4] or 0))
@classmethod
def data_dir(cls):

View file

@ -44,7 +44,7 @@ build-backend = "pdm.backend"
[tool.pdm]
# Remove this once we no longer support Python 3.8.
ignore_package_warnings = ["sphinx*"]
ignore_package_warnings = ["sphinx*", "alabaster"]
[tool.pdm.build]
# If amaranth 0.3 is checked out with git (e.g. as a part of a persistent editable install or