summaryrefslogtreecommitdiff
path: root/numpy/__config__.py.in
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/__config__.py.in')
-rw-r--r--numpy/__config__.py.in34
1 files changed, 14 insertions, 20 deletions
diff --git a/numpy/__config__.py.in b/numpy/__config__.py.in
index 659a09b26..6c6c21cb8 100644
--- a/numpy/__config__.py.in
+++ b/numpy/__config__.py.in
@@ -21,10 +21,8 @@ def _cleanup(d):
Removes empty values in a `dict` recursively
This ensures we remove values that Meson could not provide to CONFIG
"""
- if type(d) is dict:
- return dict(
- (k, _cleanup(v)) for k, v in d.items() if v and _cleanup(v)
- )
+ if isinstance(d, dict):
+ return {k: _cleanup(v) for k, v in d.items() if v and _cleanup(v)}
else:
return d
@@ -64,45 +62,41 @@ CONFIG = _cleanup(
"endian": "@BUILD_CPU_ENDIAN@",
"system": "@BUILD_CPU_SYSTEM@",
},
- "cross-compiled": "@CROSS_COMPILED@",
+ "cross-compiled": bool("@CROSS_COMPILED@".lower().replace("false", "")),
},
"Build Dependencies": {
"blas": {
"name": "@BLAS_NAME@",
- "found": "@BLAS_FOUND@",
+ "found": bool("@BLAS_FOUND@".lower().replace("false", "")),
"version": "@BLAS_VERSION@",
"detection method": "@BLAS_TYPE_NAME@",
- "include directory": "@BLAS_INCLUDEDIR@",
- "lib directory": "@BLAS_LIBDIR@",
+ "include directory": r"@BLAS_INCLUDEDIR@",
+ "lib directory": r"@BLAS_LIBDIR@",
"openblas configuration": "@BLAS_OPENBLAS_CONFIG@",
- "pc file directory": "@BLAS_PCFILEDIR@",
+ "pc file directory": r"@BLAS_PCFILEDIR@",
},
"lapack": {
"name": "@LAPACK_NAME@",
- "found": "@LAPACK_FOUND@",
+ "found": bool("@LAPACK_FOUND@".lower().replace("false", "")),
"version": "@LAPACK_VERSION@",
"detection method": "@LAPACK_TYPE_NAME@",
- "include directory": "@LAPACK_INCLUDEDIR@",
- "lib directory": "@LAPACK_LIBDIR@",
+ "include directory": r"@LAPACK_INCLUDEDIR@",
+ "lib directory": r"@LAPACK_LIBDIR@",
"openblas configuration": "@LAPACK_OPENBLAS_CONFIG@",
- "pc file directory": "@LAPACK_PCFILEDIR@",
+ "pc file directory": r"@LAPACK_PCFILEDIR@",
},
},
"Python Information": {
- "path": "@PYTHON_PATH@",
+ "path": r"@PYTHON_PATH@",
"version": "@PYTHON_VERSION@",
},
"SIMD Extensions": {
"baseline": __cpu_baseline__,
"found": [
- feature
- for feature in __cpu_dispatch__
- if __cpu_features__[feature]
+ feature for feature in __cpu_dispatch__ if __cpu_features__[feature]
],
"not found": [
- feature
- for feature in __cpu_dispatch__
- if not __cpu_features__[feature]
+ feature for feature in __cpu_dispatch__ if not __cpu_features__[feature]
],
},
}