CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
__config__.py162 linesDownload Raw Back to scipy
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
4
5__all__ = ["show"]
6_built_with_meson = True
7
8
9class DisplayModes(Enum):
10    stdout = "stdout"
11    dicts = "dicts"
12
13
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
23
24
25CONFIG = _cleanup(
26    {
27        "Compilers": {
28            "c": {
29                "name": "gcc",
30                "linker": r"ld.bfd",
31                "version": "10.3.0",
32                "commands": r"cc",
33                "args": r"",
34                "linker args": r"",
35            },
36            "cython": {
37                "name": r"cython",
38                "linker": r"cython",
39                "version": r"3.0.12",
40                "commands": r"cython",
41                "args": r"",
42                "linker args": r"",
43            },
44            "c++": {
45                "name": "gcc",
46                "linker": r"ld.bfd",
47                "version": "10.3.0",
48                "commands": r"c++",
49                "args": r"",
50                "linker args": r"",
51            },
52            "fortran": {
53                "name": "gcc",
54                "linker": r"ld.bfd",
55                "version": "10.3.0",
56                "commands": r"gfortran",
57                "args": r"",
58                "linker args": r"",
59            },
60            "pythran": {
61                "version": r"0.17.0",
62                "include directory": r"C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-1iowlesx\overlay\Lib\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"windows",
71            },
72            "build": {
73                "cpu": r"x86_64",
74                "family": r"x86_64",
75                "endian": r"little",
76                "system": r"windows",
77            },
78            "cross-compiled": bool("False".lower().replace('false', '')),
79        },
80        "Build Dependencies": {
81            "blas": {
82                "name": "scipy-openblas",
83                "found": bool("True".lower().replace('false', '')),
84                "version": "0.3.28",
85                "detection method": "pkgconfig",
86                "include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-6w_ufqtf/cp310-win_amd64/build/venv/Lib/site-packages/scipy_openblas32/include",
87                "lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-6w_ufqtf/cp310-win_amd64/build/venv/Lib/site-packages/scipy_openblas32/lib",
88                "openblas configuration": r"OpenBLAS 0.3.28 DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24",
89                "pc file directory": r"D:/a/scipy/scipy",
90            },
91            "lapack": {
92                "name": "scipy-openblas",
93                "found": bool("True".lower().replace('false', '')),
94                "version": "0.3.28",
95                "detection method": "pkgconfig",
96                "include directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-6w_ufqtf/cp310-win_amd64/build/venv/Lib/site-packages/scipy_openblas32/include",
97                "lib directory": r"C:/Users/runneradmin/AppData/Local/Temp/cibw-run-6w_ufqtf/cp310-win_amd64/build/venv/Lib/site-packages/scipy_openblas32/lib",
98                "openblas configuration": r"OpenBLAS 0.3.28 DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=24",
99                "pc file directory": r"D:/a/scipy/scipy",
100            },
101            "pybind11": {
102                "name": "pybind11",
103                "version": "2.13.6",
104                "detection method": "config-tool",
105                "include directory": r"unknown",
106            },
107        },
108        "Python Information": {
109            "path": r"C:\Users\runneradmin\AppData\Local\Temp\cibw-run-6w_ufqtf\cp310-win_amd64\build\venv\Scripts\python.exe",
110            "version": "3.10",
111        },
112    }
113)
114
115
116def _check_pyyaml():
117    import yaml
118
119    return yaml
120
121
122def show(mode=DisplayModes.stdout.value):
123    """
124    Show libraries and system information on which SciPy was built
125    and is being used
126
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.
133
134    Returns
135    -------
136    out : {`dict`, `None`}
137        If mode is `'dicts'`, a dict is returned, else None
138
139    Notes
140    -----
141    1. The `'stdout'` mode will give more readable
142       output if ``pyyaml`` is installed
143
144    """
145    if mode == DisplayModes.stdout.value:
146        try:  # Non-standard library, check import
147            yaml = _check_pyyaml()
148
149            print(yaml.dump(CONFIG))
150        except ModuleNotFoundError:
151            import warnings
152            import json
153
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        )
162 
Aluode/PerceptionLabPortable · CoolFace