File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ test = [
4646]
4747dev = [
4848 ' setuptools>=60' ,
49- ' Cython~=3.0 ' ,
49+ ' Cython~=3.1 ' ,
5050]
5151docs = [
5252 ' Sphinx~=4.1.2' ,
@@ -58,6 +58,7 @@ docs = [
5858requires = [
5959 " setuptools>=60" ,
6060 " wheel" ,
61+ " packaging" ,
6162 " Cython~=3.1" ,
6263]
6364build-backend = " setuptools.build_meta"
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