File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ test = [
4545 ' mypy>=0.800' ,
4646]
4747dev = [
48+ ' packaging>=20' ,
4849 ' setuptools>=60' ,
49- ' Cython~=3.0 ' ,
50+ ' Cython~=3.1 ' ,
5051]
5152docs = [
5253 ' Sphinx~=4.1.2' ,
@@ -56,6 +57,7 @@ docs = [
5657
5758[build-system ]
5859requires = [
60+ " packaging>=20" ,
5961 " setuptools>=60" ,
6062 " wheel" ,
6163 " Cython~=3.1" ,
Original file line number Diff line number Diff line change 2121from setuptools .command .sdist import sdist
2222
2323
24- CYTHON_DEPENDENCY = 'Cython~=3.0 '
24+ CYTHON_DEPENDENCY = 'Cython~=3.1 '
2525MACHINE = platform .machine ()
2626MODULES_CFLAGS = [os .getenv ('UVLOOP_OPT_CFLAGS' , '-O2' )]
2727_ROOT = pathlib .Path (__file__ ).parent
@@ -108,7 +108,7 @@ def finalize_options(self):
108108 need_cythonize = True
109109
110110 if need_cythonize :
111- import pkg_resources
111+ from packaging . requirements import Requirement
112112
113113 # Double check Cython presence in case setup_requires
114114 # didn't go into effect (most likely because someone
@@ -121,8 +121,8 @@ def finalize_options(self):
121121 'please install {} to compile uvloop from source' .format (
122122 CYTHON_DEPENDENCY ))
123123
124- cython_dep = pkg_resources . Requirement . parse (CYTHON_DEPENDENCY )
125- if Cython . __version__ not in cython_dep :
124+ cython_dep = Requirement (CYTHON_DEPENDENCY )
125+ if not cython_dep . specifier . contains ( Cython . __version__ ) :
126126 raise RuntimeError (
127127 'uvloop requires {}, got Cython=={}' .format (
128128 CYTHON_DEPENDENCY , Cython .__version__
You can’t perform that action at this time.
0 commit comments