Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/__config__.py: 48%
27 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-03 06:39 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-03 06:39 +0000
1# This file is generated by SciPy's build process
2# It contains system_info results at the time of building this package.
3from enum import Enum
5__all__ = ["show"]
6_built_with_meson = True
9class DisplayModes(Enum):
10 stdout = "stdout"
11 dicts = "dicts"
14def _cleanup(d):
15 """
16 Removes empty values in a `dict` recursively
17 This ensures we remove values that Meson could not provide to CONFIG
18 """
19 if isinstance(d, dict):
20 return { k: _cleanup(v) for k, v in d.items() if v != '' and _cleanup(v) != '' }
21 else:
22 return d
25CONFIG = _cleanup(
26 {
27 "Compilers": {
28 "c": {
29 "name": "clang",
30 "linker": r"ld.bfd",
31 "version": "15.0.0",
32 "commands": r"clang",
33 "args": r"-O1, -fno-omit-frame-pointer, -gline-tables-only, -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION, -fprofile-instr-generate, -fcoverage-mapping, -pthread, -Wl,--no-as-needed, -Wl,-ldl, -Wl,-lm, -Wno-unused-command-line-argument, -fno-sanitize=function,leak,vptr,",
34 "linker args": r"-O1, -fno-omit-frame-pointer, -gline-tables-only, -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION, -fprofile-instr-generate, -fcoverage-mapping, -pthread, -Wl,--no-as-needed, -Wl,-ldl, -Wl,-lm, -Wno-unused-command-line-argument, -fno-sanitize=function,leak,vptr,",
35 },
36 "cython": {
37 "name": r"cython",
38 "linker": r"cython",
39 "version": r"3.0.10",
40 "commands": r"cython",
41 "args": r"",
42 "linker args": r"",
43 },
44 "c++": {
45 "name": "clang",
46 "linker": r"ld.bfd",
47 "version": "15.0.0",
48 "commands": r"clang++",
49 "args": r"-O1, -fno-omit-frame-pointer, -gline-tables-only, -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION, -fprofile-instr-generate, -fcoverage-mapping, -pthread, -Wl,--no-as-needed, -Wl,-ldl, -Wl,-lm, -Wno-unused-command-line-argument, -stdlib=libc++, -fno-sanitize=function,leak,vptr",
50 "linker args": r"-O1, -fno-omit-frame-pointer, -gline-tables-only, -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION, -fprofile-instr-generate, -fcoverage-mapping, -pthread, -Wl,--no-as-needed, -Wl,-ldl, -Wl,-lm, -Wno-unused-command-line-argument, -stdlib=libc++, -fno-sanitize=function,leak,vptr",
51 },
52 "fortran": {
53 "name": "gcc",
54 "linker": r"ld.bfd",
55 "version": "9.4.0",
56 "commands": r"gfortran",
57 "args": r"",
58 "linker args": r"",
59 },
60 "pythran": {
61 "version": r"0.15.0",
62 "include directory": r"../../../tmp/pip-build-env-r9fna4hm/overlay/lib/python3.9/site-packages/pythran"
63 },
64 },
65 "Machine Information": {
66 "host": {
67 "cpu": r"x86_64",
68 "family": r"x86_64",
69 "endian": r"little",
70 "system": r"linux",
71 },
72 "build": {
73 "cpu": r"x86_64",
74 "family": r"x86_64",
75 "endian": r"little",
76 "system": r"linux",
77 },
78 "cross-compiled": bool("False".lower().replace('false', '')),
79 },
80 "Build Dependencies": {
81 "blas": {
82 "name": "openblas",
83 "found": bool("True".lower().replace('false', '')),
84 "version": "0.3.8",
85 "detection method": "pkgconfig",
86 "include directory": r"/usr/include/x86_64-linux-gnu/openblas-pthread/",
87 "lib directory": r"/usr/lib/x86_64-linux-gnu/openblas-pthread/",
88 "openblas configuration": r"USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64",
89 "pc file directory": r"/usr/lib/x86_64-linux-gnu/pkgconfig",
90 },
91 "lapack": {
92 "name": "openblas",
93 "found": bool("True".lower().replace('false', '')),
94 "version": "0.3.8",
95 "detection method": "pkgconfig",
96 "include directory": r"/usr/include/x86_64-linux-gnu/openblas-pthread/",
97 "lib directory": r"/usr/lib/x86_64-linux-gnu/openblas-pthread/",
98 "openblas configuration": r"USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE=1 NO_AFFINITY=1 USE_OPENMP=0 generic MAX_THREADS=64",
99 "pc file directory": r"/usr/lib/x86_64-linux-gnu/pkgconfig",
100 },
101 "pybind11": {
102 "name": "pybind11",
103 "version": "2.12.0",
104 "detection method": "config-tool",
105 "include directory": r"unknown",
106 },
107 },
108 "Python Information": {
109 "path": r"/usr/local/bin/python3",
110 "version": "3.9",
111 },
112 }
113)
116def _check_pyyaml():
117 import yaml
119 return yaml
122def show(mode=DisplayModes.stdout.value):
123 """
124 Show libraries and system information on which SciPy was built
125 and is being used
127 Parameters
128 ----------
129 mode : {`'stdout'`, `'dicts'`}, optional.
130 Indicates how to display the config information.
131 `'stdout'` prints to console, `'dicts'` returns a dictionary
132 of the configuration.
134 Returns
135 -------
136 out : {`dict`, `None`}
137 If mode is `'dicts'`, a dict is returned, else None
139 Notes
140 -----
141 1. The `'stdout'` mode will give more readable
142 output if ``pyyaml`` is installed
144 """
145 if mode == DisplayModes.stdout.value:
146 try: # Non-standard library, check import
147 yaml = _check_pyyaml()
149 print(yaml.dump(CONFIG))
150 except ModuleNotFoundError:
151 import warnings
152 import json
154 warnings.warn("Install `pyyaml` for better output", stacklevel=1)
155 print(json.dumps(CONFIG, indent=2))
156 elif mode == DisplayModes.dicts.value:
157 return CONFIG
158 else:
159 raise AttributeError(
160 f"Invalid `mode`, use one of: {', '.join([e.value for e in DisplayModes])}"
161 )