From 295ba863a9af5fd6c7895ba6e449478a53f9d3db Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 25 Oct 2016 22:17:35 -0700 Subject: [PATCH 1/2] Use old Cython build_ext until includes are fixed. This change The distutils extension Cython.Distutils.build_ext has now been updated to use cythonize which properly handles dependencies. The old extension can still be found in Cython.Distutils.old_build_ext and is now deprecated. in Cython 0.25 seems to have broken includes. As a temporary workaround, the old build_ext can be used. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3f8667cd6fe42..fb05510e90c32 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ def is_platform_mac(): try: if not _CYTHON_INSTALLED: raise ImportError('No supported version of Cython installed.') - from Cython.Distutils import build_ext as _build_ext + from Cython.Distutils.old_build_ext import old_build_ext as _build_ext cython = True except ImportError: cython = False From 3d977c3093f486aae36da99017f1009454a56a7d Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 26 Oct 2016 08:58:24 -0700 Subject: [PATCH 2/2] Simultaneously support older and newer versions of Cython --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fb05510e90c32..a17dd502d7706 100755 --- a/setup.py +++ b/setup.py @@ -85,7 +85,11 @@ def is_platform_mac(): try: if not _CYTHON_INSTALLED: raise ImportError('No supported version of Cython installed.') - from Cython.Distutils.old_build_ext import old_build_ext as _build_ext + try: + from Cython.Distutils.old_build_ext import old_build_ext as _build_ext + except ImportError: + # Pre 0.25 + from Cython.Distutils import build_ext as _build_ext cython = True except ImportError: cython = False