parameters: (self, info)
return_statement: return None
docstring: Check whether we can link with CBLAS interface
  
          This method will search through several combinations of libraries
          to check whether CBLAS is present:
  
          1. Libraries in ``info['libraries']``, as is
          2. As 1. but also explicitly adding ``'cblas'`` as a library
          3. As 1. but also explicitly adding ``'blas'`` as a library
          4. Check only library ``'cblas'``
          5. Check only library ``'blas'``
  
          Parameters
          ----------
          info : dict
             system information dictionary for compilation and linking
  
          Returns
          -------
          libraries : list of str or None
              a list of libraries that enables the use of CBLAS interface.
              Returns None if not found or a compilation error occurs.
  
              Since 1.17 returns a list.
docstring_summary: Check whether we can link with CBLAS interface
docstring_tokens: Check whether we can link with CBLAS interface
function: def get_cblas_libs(self, info):
          """ Check whether we can link with CBLAS interface
  
          This method will search through several combinations of libraries
          to check whether CBLAS is present:
  
          1. Libraries in ``info['libraries']``, as is
          2. As 1. but also explicitly adding ``'cblas'`` as a library
          3. As 1. but also explicitly adding ``'blas'`` as a library
          4. Check only library ``'cblas'``
          5. Check only library ``'blas'``
  
          Parameters
          ----------
          info : dict
             system information dictionary for compilation and linking
  
          Returns
          -------
          libraries : list of str or None
              a list of libraries that enables the use of CBLAS interface.
              Returns None if not found or a compilation error occurs.
  
              Since 1.17 returns a list.
          """
          # primitive cblas check by looking for the header and trying to link
          # cblas or blas
          c = customized_ccompiler()
          tmpdir = tempfile.mkdtemp()
          s = textwrap.dedent("""\
              #include <cblas.h>
              int main(int argc, const char *argv[])
              {
                  double a[4] = {1,2,3,4};
                  double b[4] = {5,6,7,8};
                  return cblas_ddot(4, a, 1, b, 1) > 10;
              }""")
          src = os.path.join(tmpdir, 'source.c')
          try:
              with open(src, 'wt') as f:
                  f.write(s)
  
              try:
                  # check we can compile (find headers)
                  obj = c.compile([src], output_dir=tmpdir,
                                  include_dirs=self.get_include_dirs())
              except (distutils.ccompiler.CompileError, distutils.ccompiler.LinkError):
                  return None
  
              # check we can link (find library)
              # some systems have separate cblas and blas libs.
              for libs in [info['libraries'], ['cblas'] + info['libraries'],
                           ['blas'] + info['libraries'], ['cblas'], ['blas']]:
                  try:
                      c.link_executable(obj, os.path.join(tmpdir, "a.out"),
                                        libraries=libs,
                                        library_dirs=info['library_dirs'],
                                        extra_postargs=info.get('extra_link_args', []))
                      return libs
                  except distutils.ccompiler.LinkError:
                      pass
          finally:
              shutil.rmtree(tmpdir)
          return None
function_tokens: def get_cblas_libs ( self , info ) : # primitive cblas check by looking for the header and trying to link # cblas or blas c = customized_ccompiler ( ) tmpdir = tempfile . mkdtemp ( ) s = textwrap . dedent ( """\
              #include <cblas.h>
              int main(int argc, const char *argv[])
              {
                  double a[4] = {1,2,3,4};
                  double b[4] = {5,6,7,8};
                  return cblas_ddot(4, a, 1, b, 1) > 10;
              }""" ) src = os . path . join ( tmpdir , 'source.c' ) try : with open ( src , 'wt' ) as f : f . write ( s ) try : # check we can compile (find headers) obj = c . compile ( [ src ] , output_dir = tmpdir , include_dirs = self . get_include_dirs ( ) ) except ( distutils . ccompiler . CompileError , distutils . ccompiler . LinkError ) : return None # check we can link (find library) # some systems have separate cblas and blas libs. for libs in [ info [ 'libraries' ] , [ 'cblas' ] + info [ 'libraries' ] , [ 'blas' ] + info [ 'libraries' ] , [ 'cblas' ] , [ 'blas' ] ] : try : c . link_executable ( obj , os . path . join ( tmpdir , "a.out" ) , libraries = libs , library_dirs = info [ 'library_dirs' ] , extra_postargs = info . get ( 'extra_link_args' , [ ] ) ) return libs except distutils . ccompiler . LinkError : pass finally : shutil . rmtree ( tmpdir ) return None