File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import platform
1212import sys
1313
14+ from packaging .version import Version
1415from setuptools import setup
1516
16- # Python 3.12 dropped distutils from the stdlib. Try to access it via
17- # setuptools.
18- try :
19- from setuptools ._distutils .version import LooseVersion
20- except ImportError :
21- from distutils .version import LooseVersion
22-
2317if sys .version_info [0 :2 ] < (3 , 9 ):
2418 print ("Python 3.9+ is required" , file = sys .stderr )
2519 sys .exit (1 )
5953
6054 # PyPy (and possibly other distros) have CFFI distributed as part of
6155 # them.
62- cffi_version = LooseVersion (cffi .__version__ )
63- if cffi_version < LooseVersion (MINIMUM_CFFI_VERSION ):
56+ cffi_version = Version (cffi .__version__ )
57+ if cffi_version < Version (MINIMUM_CFFI_VERSION ):
6458 print (
6559 "CFFI %s or newer required (%s found); "
6660 "not building CFFI backend" % (MINIMUM_CFFI_VERSION , cffi_version ),
You can’t perform that action at this time.
0 commit comments