Skip to content

Commit

Permalink
build(setup.py): replace deprecated LooseVersion with sys.version_info
Browse files Browse the repository at this point in the history
DeprecationWarning: distutils Version classes are deprecated.
  • Loading branch information
eginhard committed Apr 4, 2024
1 parent fdb8c49 commit 8bd78ba
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@
import os
import subprocess
import sys
from distutils.version import LooseVersion

import setuptools.command.build_py
import setuptools.command.develop
from setuptools import find_packages, setup

if LooseVersion(sys.version) < LooseVersion("3.6") or LooseVersion(
sys.version
) > LooseVersion("3.13"):
raise RuntimeError(
"Trainer requires python >= 3.6 and <=3.12 "
"but your Python version is {}".format(sys.version)
)
if sys.version_info < (3, 6) or sys.version_info >= (3, 13):
raise RuntimeError("Trainer requires python >= 3.6 and <3.13 " "but your Python version is {}".format(sys.version))


cwd = os.path.dirname(os.path.abspath(__file__))
Expand Down

0 comments on commit 8bd78ba

Please sign in to comment.