File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1212import sys
1313import sysconfig
1414
15+ from packaging .version import Version
1516from setuptools import setup
1617
17- # Python 3.12 dropped distutils from the stdlib. Try to access it via
18- # setuptools.
19- try :
20- from setuptools ._distutils .version import LooseVersion
21- except ImportError :
22- from distutils .version import LooseVersion
23-
2418if sys .version_info [0 :2 ] < (3 , 9 ):
2519 print ("Python 3.9+ is required" , file = sys .stderr )
2620 sys .exit (1 )
6155
6256 # PyPy (and possibly other distros) have CFFI distributed as part of
6357 # them.
64- cffi_version = LooseVersion ( cffi .__version__ )
65- if cffi_version < LooseVersion (MINIMUM_CFFI_VERSION ):
58+ cffi_version = Version ( Version ( cffi .__version__ ). base_version )
59+ if cffi_version < Version (MINIMUM_CFFI_VERSION ):
6660 print (
6761 "CFFI %s or newer required (%s found); "
6862 "not building CFFI backend" % (MINIMUM_CFFI_VERSION , cffi_version ),
You can’t perform that action at this time.
0 commit comments