__config__.py 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # This file is generated by numpy's setup.py
  2. # It contains system_info results at the time of building this package.
  3. __all__ = ["get_info","show"]
  4. import os
  5. import sys
  6. extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
  7. if sys.platform == 'win32' and os.path.isdir(extra_dll_dir):
  8. if sys.version_info >= (3, 8):
  9. os.add_dll_directory(extra_dll_dir)
  10. else:
  11. os.environ.setdefault('PATH', '')
  12. os.environ['PATH'] += os.pathsep + extra_dll_dir
  13. blas_mkl_info={}
  14. blis_info={}
  15. openblas_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]}
  16. blas_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]}
  17. lapack_mkl_info={}
  18. openblas_lapack_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]}
  19. lapack_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]}
  20. def get_info(name):
  21. g = globals()
  22. return g.get(name, g.get(name + "_info", {}))
  23. def show():
  24. """
  25. Show libraries in the system on which NumPy was built.
  26. Print information about various resources (libraries, library
  27. directories, include directories, etc.) in the system on which
  28. NumPy was built.
  29. See Also
  30. --------
  31. get_include : Returns the directory containing NumPy C
  32. header files.
  33. Notes
  34. -----
  35. Classes specifying the information to be printed are defined
  36. in the `numpy.distutils.system_info` module.
  37. Information may include:
  38. * ``language``: language used to write the libraries (mostly
  39. C or f77)
  40. * ``libraries``: names of libraries found in the system
  41. * ``library_dirs``: directories containing the libraries
  42. * ``include_dirs``: directories containing library header files
  43. * ``src_dirs``: directories containing library source files
  44. * ``define_macros``: preprocessor macros used by
  45. ``distutils.setup``
  46. Examples
  47. --------
  48. >>> np.show_config()
  49. blas_opt_info:
  50. language = c
  51. define_macros = [('HAVE_CBLAS', None)]
  52. libraries = ['openblas', 'openblas']
  53. library_dirs = ['/usr/local/lib']
  54. """
  55. for name,info_dict in globals().items():
  56. if name[0] == "_" or type(info_dict) is not type({}): continue
  57. print(name + ":")
  58. if not info_dict:
  59. print(" NOT AVAILABLE")
  60. for k,v in info_dict.items():
  61. v = str(v)
  62. if k == "sources" and len(v) > 200:
  63. v = v[:60] + " ...\n... " + v[-60:]
  64. print(" %s = %s" % (k,v))