File tree Expand file tree Collapse file tree 5 files changed +12
-9
lines changed
Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ source:
1010requirements :
1111 build :
1212 - python
13+ - packaging
1314 - setuptools
1415
1516 run :
Original file line number Diff line number Diff line change 11cffi
2+ packaging
23wheel
Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ cffi==1.17.1 \
6969 --hash =sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
7070 --hash =sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
7171 # via -r ci/requirements.in
72+ packaging == 25.0 \
73+ --hash =sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484 \
74+ --hash =sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f
75+ # via -r ci/requirements.in
7276pycparser == 2.22 \
7377 --hash =sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
7478 --hash =sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ Version History
5050 formally support free-threaded builds. (#276)
5151* The C and Rust backends now declare the GIL as unused.
5252* The `pythoncapi_compat.h ` file has been upgraded to the latest version. (#278)
53+ * `setup.py ` now depends on `packaging ` and uses `packaging.version.Version ` for
54+ version comparisons. This removes some deprecation warnings from usage of
55+ legacy distutils `Version ` classes.
5356
54570.24.0 (released 2025-08-17)
5558============================
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