Commit 4ecdd3e4 authored by Robert Bradshaw's avatar Robert Bradshaw

Revert Cython.Distutils.build_ext to use old_build_ext

This gives projects more time to move over, and reduces the number
of changes in the 0.25 series.
parent 0d763159
......@@ -11,10 +11,13 @@ else:
from distutils.command.build_ext import build_ext as _build_ext
class build_ext(_build_ext, object):
class new_build_ext(_build_ext, object):
def finalize_options(self):
if self.distribution.ext_modules:
from Cython.Build.Dependencies import cythonize
self.distribution.ext_modules[:] = cythonize(
self.distribution.ext_modules)
super(build_ext, self).finalize_options()
# This will become new_build_ext in the future.
from Cython.Distutils.old_build_ext as build_ext
......@@ -21,10 +21,11 @@ try:
frames = inspect.getouterframes(inspect.currentframe(), 2)
from_setuptools = 'setuptools/extension.py' in frames[2][1]
from_pyximport = 'pyximport/pyxbuild.py' in frames[1][1]
from_cy_buildext = 'Cython/Distutils/build_ext.py' in frames[1][1]
except Exception:
from_setuptools = from_pyximport = False
from_setuptools = from_pyximport = from_cy_buildext = False
if not from_setuptools and not from_pyximport:
if not from_setuptools and not from_pyximport and not from_cy_buildext:
warnings.warn(
"Cython.Distutils.old_build_ext does not properly handle dependencies "
"and is deprecated.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment