From 0ffa12f562eb62c1face86d848851627482022d6 Mon Sep 17 00:00:00 2001 From: holgern Date: Wed, 29 Jan 2020 16:59:54 +0100 Subject: [PATCH] Fix sys import in __init__ --- skopt/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/skopt/__init__.py b/skopt/__init__.py index 88f9b9b9f..b98a981c5 100644 --- a/skopt/__init__.py +++ b/skopt/__init__.py @@ -45,7 +45,6 @@ def f(x): Run the tests by executing `pytest` in the top level directory. """ -import sys try: # This variable is injected in the __builtins__ by the build # process. It is used to enable importing subpackages of sklearn when @@ -73,8 +72,8 @@ def f(x): # __version__ = "0.7" - if __SKOPT_SETUP__: + import sys sys.stderr.write('Partial import of skopt during the build process.\n') # We are not importing the rest of scikit-optimize during the build # process, as it may not be compiled yet