Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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 

5 

6import os 

7import sys 

8 

9extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs') 

10 

11if sys.platform == 'win32' and os.path.isdir(extra_dll_dir): 

12 if sys.version_info >= (3, 8): 

13 os.add_dll_directory(extra_dll_dir) 

14 else: 

15 os.environ.setdefault('PATH', '') 

16 os.environ['PATH'] += os.pathsep + extra_dll_dir 

17 

18blas_mkl_info={} 

19blis_info={} 

20openblas_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} 

21blas_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} 

22lapack_mkl_info={} 

23openblas_lapack_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} 

24lapack_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c', 'define_macros': [('HAVE_CBLAS', None)]} 

25 

26def get_info(name): 

27 g = globals() 

28 return g.get(name, g.get(name + "_info", {})) 

29 

30def show(): 

31 """ 

32 Show libraries in the system on which NumPy was built. 

33 

34 Print information about various resources (libraries, library 

35 directories, include directories, etc.) in the system on which 

36 NumPy was built. 

37 

38 See Also 

39 -------- 

40 get_include : Returns the directory containing NumPy C 

41 header files. 

42 

43 Notes 

44 ----- 

45 Classes specifying the information to be printed are defined 

46 in the `numpy.distutils.system_info` module. 

47 

48 Information may include: 

49 

50 * ``language``: language used to write the libraries (mostly 

51 C or f77) 

52 * ``libraries``: names of libraries found in the system 

53 * ``library_dirs``: directories containing the libraries 

54 * ``include_dirs``: directories containing library header files 

55 * ``src_dirs``: directories containing library source files 

56 * ``define_macros``: preprocessor macros used by 

57 ``distutils.setup`` 

58 

59 Examples 

60 -------- 

61 >>> np.show_config() 

62 blas_opt_info: 

63 language = c 

64 define_macros = [('HAVE_CBLAS', None)] 

65 libraries = ['openblas', 'openblas'] 

66 library_dirs = ['/usr/local/lib'] 

67 """ 

68 for name,info_dict in globals().items(): 

69 if name[0] == "_" or type(info_dict) is not type({}): continue 

70 print(name + ":") 

71 if not info_dict: 

72 print(" NOT AVAILABLE") 

73 for k,v in info_dict.items(): 

74 v = str(v) 

75 if k == "sources" and len(v) > 200: 

76 v = v[:60] + " ...\n... " + v[-60:] 

77 print(" %s = %s" % (k,v))