From 60df40a251f81c3b151173807736b73bc9df6046 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 29 May 2019 11:58:03 -0500 Subject: [PATCH] BUG: moved from Cython import Tempita from top file to where needed Present of import atop the test file caused pytest to fail collecting tests if the testing environment did not have cython installed. --- sklearn/linear_model/setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sklearn/linear_model/setup.py b/sklearn/linear_model/setup.py index 7cc7922ce4a6e..8226412fdecbd 100644 --- a/sklearn/linear_model/setup.py +++ b/sklearn/linear_model/setup.py @@ -2,8 +2,6 @@ import numpy -from Cython import Tempita - def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration @@ -32,6 +30,7 @@ def configuration(parent_package='', top_path=None): with open(sag_cython_file, "r") as f: tmpl = f.read() + from Cython import Tempita # noqa tmpl_ = Tempita.sub(tmpl) with open(sag_file, "w") as f: