2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 19:28:26 +08:00

kasli_generic: fix LooseVersion deprecation warning

This commit is contained in:
Sebastien Bourdeauducq 2023-05-23 19:36:06 +08:00
parent 598c7b1d25
commit 58cc3b8d0a

View File

@ -2,7 +2,7 @@
import argparse import argparse
import logging import logging
from distutils.version import LooseVersion from packaging.version import Version
from misoc.integration.builder import builder_args, builder_argdict from misoc.integration.builder import builder_args, builder_argdict
from misoc.targets.kasli import soc_kasli_args, soc_kasli_argdict from misoc.targets.kasli import soc_kasli_args, soc_kasli_argdict
@ -150,7 +150,7 @@ def main():
description = jsondesc.load(args.description) description = jsondesc.load(args.description)
min_artiq_version = description.get("min_artiq_version", "0") min_artiq_version = description.get("min_artiq_version", "0")
if LooseVersion(artiq_version) < LooseVersion(min_artiq_version): if Version(artiq_version) < Version(min_artiq_version):
logger.warning("ARTIQ version mismatch: current %s < %s minimum", logger.warning("ARTIQ version mismatch: current %s < %s minimum",
artiq_version, min_artiq_version) artiq_version, min_artiq_version)