Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,28 +188,17 @@ def finalize_options(self):
need_cythonize = True

if need_cythonize:
import pkg_resources

# Double check Cython presence in case setup_requires
# didn't go into effect (most likely because someone
# imported Cython before setup_requires injected the
# correct egg into sys.path.
try:
import Cython
from Cython.Build import cythonize
except ImportError:
raise RuntimeError(
'please install {} to compile asyncpg from source'.format(
CYTHON_DEPENDENCY))

cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
if Cython.__version__ not in cython_dep:
raise RuntimeError(
'asyncpg requires {}, got Cython=={}'.format(
CYTHON_DEPENDENCY, Cython.__version__
))

from Cython.Build import cythonize

directives = {
'language_level': '3',
'freethreading_compatible': 'True',
Expand Down
Loading