def maybe_cythonize_extensions(top_path, config):
 is_release = os.path.exists(os.path.join(top_path, 'PKG-INFO'))
 if is_release:
  build_from_c_and_cpp_files(config.ext_modules)
 else:
  message = 'Please install cython with a version >= {0} in order to build a scikit-learn development version.'.format(CYTHON_MIN_VERSION)
  try:
   import Cython
   if (LooseVersion(Cython.__version__) < CYTHON_MIN_VERSION):
    message += ' Your version of Cython was {0}.'.format(Cython.__version__)
    raise ValueError(message)
   from Cython.Build import cythonize
  except ImportError as exc:
   exc.args += (message,)
   raise
  config.ext_modules = cythonize(config.ext_modules)

def maybe_cythonize_extensions ( top_path , config ) : is_release = os . path . exists ( os . path . join ( top_path , 'PKG-INFO' ) ) if is_release : build_from_c_and_cpp_files ( config . ext_modules ) else : message = 'Please install cython with a version >= {0} in order to build a scikit-learn development version.' . format ( CYTHON_MIN_VERSION ) try : import Cython if ( LooseVersion ( Cython . __version__ ) < CYTHON_MIN_VERSION ) : message += ' Your version of Cython was {0}.' . format ( Cython . __version__ ) raise ValueError ( message ) from Cython . Build import cythonize except ImportError as exc : exc . args += ( message , ) raise config . ext_modules = cythonize ( config . ext_modules )
tweaks for building extensions between release and development mode .