Skip to content

Commit bce6491

Browse files
Drop the Cython version check from setup.py
This avoids the dependency on the pkg_resources module, which has long been deprecated and is no longer shipped with current versions of setuptools.
1 parent db8ecc2 commit bce6491

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

setup.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ def finalize_options(self):
188188
need_cythonize = True
189189

190190
if need_cythonize:
191-
import pkg_resources
192-
193191
# Double check Cython presence in case setup_requires
194192
# didn't go into effect (most likely because someone
195193
# imported Cython before setup_requires injected the
@@ -201,13 +199,6 @@ def finalize_options(self):
201199
'please install {} to compile asyncpg from source'.format(
202200
CYTHON_DEPENDENCY))
203201

204-
cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
205-
if Cython.__version__ not in cython_dep:
206-
raise RuntimeError(
207-
'asyncpg requires {}, got Cython=={}'.format(
208-
CYTHON_DEPENDENCY, Cython.__version__
209-
))
210-
211202
from Cython.Build import cythonize
212203

213204
directives = {

0 commit comments

Comments
 (0)