Skip to content

Commit c33c679

Browse files
ganesh-k13tylerjereddy
authored andcommitted
BUG: Use raw strings for paths
* `\U` leads to strings being treated as unicode, hence we escape it with raw strings * Changed bool parameters real bools instead of string `"True"` and `"False"` [wheel build]
1 parent 78e790c commit c33c679

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

scipy/__config__.py.in

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def _cleanup(d):
1717
This ensures we remove values that Meson could not provide to CONFIG
1818
"""
1919
if isinstance(d, dict):
20-
return { k: _cleanup(v) for k, v in d.items() if v and _cleanup(v) }
20+
return { k: _cleanup(v) for k, v in d.items() if v != '' and _cleanup(v) != '' }
2121
else:
2222
return d
2323

@@ -51,7 +51,7 @@ CONFIG = _cleanup(
5151
},
5252
"pythran": {
5353
"version": "@PYTHRAN_VERSION@",
54-
"include directory": "@PYTHRAN_INCDIR@"
54+
"include directory": r"@PYTHRAN_INCDIR@"
5555
},
5656
},
5757
"Machine Information": {
@@ -67,32 +67,32 @@ CONFIG = _cleanup(
6767
"endian": "@BUILD_CPU_ENDIAN@",
6868
"system": "@BUILD_CPU_SYSTEM@",
6969
},
70-
"cross-compiled": "@CROSS_COMPILED@",
70+
"cross-compiled": bool("@CROSS_COMPILED@".lower().replace('false', '')),
7171
},
7272
"Build Dependencies": {
7373
"blas": {
7474
"name": "@BLAS_NAME@",
75-
"found": "@BLAS_FOUND@",
75+
"found": bool("@BLAS_FOUND@".lower().replace('false', '')),
7676
"version": "@BLAS_VERSION@",
7777
"detection method": "@BLAS_TYPE_NAME@",
78-
"include directory": "@BLAS_INCLUDEDIR@",
79-
"lib directory": "@BLAS_LIBDIR@",
78+
"include directory": r"@BLAS_INCLUDEDIR@",
79+
"lib directory": r"@BLAS_LIBDIR@",
8080
"openblas configuration": "@BLAS_OPENBLAS_CONFIG@",
81-
"pc file directory": "@BLAS_PCFILEDIR@",
81+
"pc file directory": r"@BLAS_PCFILEDIR@",
8282
},
8383
"lapack": {
8484
"name": "@LAPACK_NAME@",
85-
"found": "@LAPACK_FOUND@",
85+
"found": bool("@LAPACK_FOUND@".lower().replace('false', '')),
8686
"version": "@LAPACK_VERSION@",
8787
"detection method": "@LAPACK_TYPE_NAME@",
88-
"include directory": "@LAPACK_INCLUDEDIR@",
89-
"lib directory": "@LAPACK_LIBDIR@",
88+
"include directory": r"@LAPACK_INCLUDEDIR@",
89+
"lib directory": r"@LAPACK_LIBDIR@",
9090
"openblas configuration": "@LAPACK_OPENBLAS_CONFIG@",
91-
"pc file directory": "@LAPACK_PCFILEDIR@",
91+
"pc file directory": r"@LAPACK_PCFILEDIR@",
9292
},
9393
},
9494
"Python Information": {
95-
"path": "@PYTHON_PATH@",
95+
"path": r"@PYTHON_PATH@",
9696
"version": "@PYTHON_VERSION@",
9797
},
9898
}

0 commit comments

Comments
 (0)