8000 BLD: fix potential issue with escape sequences in ``__config__.py`` · numpy/numpy@273edc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 273edc7

Browse files
committed
BLD: fix potential issue with escape sequences in __config__.py
Backport of #25669. The current code isn't robust to backslashes (from path segments on Windows) in linker flags. No bug report for NumPy, but the same problem did show up in SciPy already. Fix is the same as scipy/scipy#19945. This actually pulls in all of `__config__.py` from main because there have been a number of other changes. [skip cirrus] [skip circle]
1 parent 1d50085 commit 273edc7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

numpy/__config__.py.in

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is generated by numpy's build process
22
# It contains system_info results at the time of building this package.
33
from enum import Enum
4-
from numpy.core._multiarray_umath import (
4+
from numpy._core._multiarray_umath import (
55
__cpu_features__,
66
__cpu_baseline__,
77
__cpu_dispatch__,
@@ -32,21 +32,27 @@ CONFIG = _cleanup(
3232
"Compilers": {
3333
"c": {
3434
"name": "@C_COMP@",
35-
"linker": "@C_COMP_LINKER_ID@",
35+
"linker": r"@C_COMP_LINKER_ID@",
3636
"version": "@C_COMP_VERSION@",
37-
"commands": "@C_COMP_CMD_ARRAY@",
37+
"commands": r"@C_COMP_CMD_ARRAY@",
38+
"args": r"@C_COMP_ARGS@",
39+
"linker args": r"@C_COMP_LINK_ARGS@",
3840
},
3941
"cython": {
4042
"name": "@CYTHON_COMP@",
41-
"linker": "@CYTHON_COMP_LINKER_ID@",
43+
"linker": r"@CYTHON_COMP_LINKER_ID@",
4244
"version": "@CYTHON_COMP_VERSION@",
43-
"commands": "@CYTHON_COMP_CMD_ARRAY@",
45+
"commands": r"@CYTHON_COMP_CMD_ARRAY@",
46+
"args": r"@CYTHON_COMP_ARGS@",
47+
"linker args": r"@CYTHON_COMP_LINK_ARGS@",
4448
},
4549
"c++": {
4650
"name": "@CPP_COMP@",
47-
"linker": "@CPP_COMP_LINKER_ID@",
51+
"linker": r"@CPP_COMP_LINKER_ID@",
4852
"version": "@CPP_COMP_VERSION@",
49-
"commands": "@CPP_COMP_CMD_ARRAY@",
53+
"commands": r"@CPP_COMP_CMD_ARRAY@",
54+
"args": r"@CPP_COMP_ARGS@",
55+
"linker args": r"@CPP_COMP_LINK_ARGS@",
5056
},
5157
},
5258
"Machine Information": {
@@ -72,7 +78,7 @@ CONFIG = _cleanup(
7278
"detection method": "@BLAS_TYPE_NAME@",
7379
"include directory": r"@BLAS_INCLUDEDIR@",
7480
"lib directory": r"@BLAS_LIBDIR@",
75-
"openblas configuration": "@BLAS_OPENBLAS_CONFIG@",
81+
"openblas configuration": r"@BLAS_OPENBLAS_CONFIG@",
7682
"pc file directory": r"@BLAS_PCFILEDIR@",
7783
},
7884
"lapack": {
@@ -82,7 +88,7 @@ CONFIG = _cleanup(
8288
"detection method": "@LAPACK_TYPE_NAME@",
8389
"include directory": r"@LAPACK_INCLUDEDIR@",
8490
"lib directory": r"@LAPACK_LIBDIR@",
85-
"openblas configuration": "@LAPACK_OPENBLAS_CONFIG@",
91+
"openblas configuration": r"@LAPACK_OPENBLAS_CONFIG@",
8692
"pc file directory": r"@LAPACK_PCFILEDIR@",
8793
},
8894
},

0 commit comments

Comments
 (0)
0