File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" packaging" , " setuptools" ]
3+ build-backend = " setuptools.build_meta"
Original file line number Diff line number Diff line change 1010from setuptools import setup , Extension
1111from setuptools .command .build_ext import build_ext
1212from setuptools .command .sdist import sdist as orig_sdist
13- from distutils .version import LooseVersion
13+ from packaging .version import Version
1414
1515BASEDIR = os .path .split (os .path .abspath (__file__ ))[0 ]
1616
@@ -75,8 +75,8 @@ def run(self):
7575 ", " .join (e .name for e in self .extensions ))
7676
7777 if platform .system () == "Windows" :
78- cmake_version = LooseVersion (re .search (r'version\s*([\d.]+)' , out .decode ()).group (1 ))
79- if cmake_version < '3.1.0' :
78+ cmake_version = Version (re .search (r'version\s*([\d.]+)' , out .decode ()).group (1 ))
79+ if cmake_version < Version ( '3.1.0' ) :
8080 raise RuntimeError ("CMake >= 3.1.0 is required on Windows" )
8181
8282 for ext in self .extensions :
You can’t perform that action at this time.
0 commit comments