From cdcbdf07ebdc5a5591749f3d68a58b6444a96d4c Mon Sep 17 00:00:00 2001 From: Koen Vervloesem Date: Sat, 17 Dec 2022 12:25:09 +0100 Subject: [PATCH] Remove usage of packaging.LegacyVersion (#84) Dropped in packaging 22.0, which makes the installation fail. Scikit-build instructions now recommend to use packaging.version.parse. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f0ff98e7..6a3b5fd9 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # read the contents of your README file from pathlib import Path -from packaging.version import LegacyVersion +from packaging import version from skbuild import setup from skbuild.cmaker import get_cmake_version from skbuild.exceptions import SKBuildError @@ -13,7 +13,7 @@ # or is too low a version setup_requires = [] try: - if LegacyVersion(get_cmake_version()) < LegacyVersion("3.4"): + if version.parse(get_cmake_version()) < version.parse("3.4"): setup_requires.append("cmake") except SKBuildError: setup_requires.append("cmake")