From bec42e5cb0a106e1ad90d754586e1ada014fea8c Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Wed, 18 Dec 2019 12:07:48 -0800 Subject: [PATCH] Cleaned up Tempita refs and Cython import --- setup.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 45f3af3d5c374..c6b078dae280a 100755 --- a/setup.py +++ b/setup.py @@ -63,24 +63,15 @@ def is_platform_mac(): from distutils.extension import Extension # noqa: E402 isort:skip from distutils.command.build import build # noqa: E402 isort:skip -try: - if not _CYTHON_INSTALLED: - raise ImportError("No supported version of Cython installed.") +if _CYTHON_INSTALLED: from Cython.Distutils.old_build_ext import old_build_ext as _build_ext cython = True -except ImportError: + from Cython import Tempita as tempita +else: from distutils.command.build_ext import build_ext as _build_ext cython = False -else: - try: - try: - from Cython import Tempita as tempita - except ImportError: - import tempita - except ImportError: - raise ImportError("Building pandas requires Tempita: pip install Tempita") _pxi_dep_template = {