Skip to content

Commit

Permalink
Remove usage of packaging.LegacyVersion (#84)
Browse files Browse the repository at this point in the history
Dropped in packaging 22.0, which makes the installation fail.
Scikit-build instructions now recommend to use
packaging.version.parse.
  • Loading branch information
koenvervloesem committed Dec 17, 2022
1 parent 22d5eb1 commit cdcbdf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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")
Expand Down

0 comments on commit cdcbdf0

Please sign in to comment.