diff --git a/setup.py b/setup.py index 9745ede4..c7993960 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,6 @@ from setuptools import Command, Extension, setup -# Default to using cython, but use the .c files if it doesn't exist -try: - from Cython.Build import cythonize -except ImportError: - cythonize = False - COMPILER_DIRECTIVES = {} # This Cython macro disables a build warning, obsolete with Cython>=3 # see : https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#numpy-c-api @@ -130,7 +124,7 @@ def _set_builtin(name, value): udunits_ext = Extension( f"{PACKAGE}._udunits2", - [str(Path(f"{PACKAGE}") / f"_udunits2.{'pyx' if cythonize else 'c'}")], + [str(Path(f"{PACKAGE}") / "_udunits2.pyx")], include_dirs=get_include_dirs(), library_dirs=library_dirs, libraries=["udunits2"], @@ -140,15 +134,6 @@ def _set_builtin(name, value): ), ) -if cythonize: - [udunits_ext] = cythonize( - udunits_ext, - compiler_directives=COMPILER_DIRECTIVES, - # Assert python 3 source syntax: Currently required to suppress a warning, - # even though this is now the default (as-of Cython v3). - language_level="3str", - ) - cmdclass = {"clean_cython": CleanCython, "build_ext": numpy_build_ext} kwargs = dict(