-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: set NDEBUG for release builds #325
Conversation
NDEBUG is normally expected to be set for release builds, however for historical reasons Meson does not (yet) toggle `NDEBUG` for non-debug builds (which we already default to). So set this as the default. Choosing 'if-release' so that if users are explicitly asking for a debug build via config-settings, they don't see a change in behavior. xref numpy/numpy#22546 (comment)
I don't think this is a particularly good idea. I don't like meson-python getting into the busyness of choosing default compilation flags. I think Meson and the individual projects are much better placed for choosing defaults and setting the options they need. The |
Did you read the linked comment @dnicolodi? Not doing this but then recommending every single user of If we can get Meson to change (mesonbuild/meson#2566) then we can drop this again, but that may take longer.
This isn't a very good reason I'd say. The default in |
I read the linked comment, but I don't see how you jump from @eli-schwartz position of "developers should put |
If it were possible to only set it when the project doesn't set it in default_options, would that make everyone happy? Unfortunately, machine files aren't the answer here, as those still override default_options. What you can do, however, is:
and load that json into a dictionary "j". |
For the sake of argument, you can also override it in pyproject.toml, now, right? (I am not sure UX-wise what the best option layering is, here, so I'm going to try to avoid being too opinionated.) |
Yes, but I'm operating entirely on the premise that both project authors and
That sounds pretty nice. |
Am I missing something or this only gives you the current value, not whether it the default set by Meson or the value in |
Ah right, if someone sets the default explicitly to the default... you cannot just say "aha, this differs from what I happen to know meson defaults to"... You can use json output
{
"lines": [
{
"args": {
"positional": [
{
"value": "SciPy",
"node": "StringNode",
"lineno": 2,
"colno": 2,
"end_lineno": 2,
"end_colno": 2
},
{
"value": "c",
"node": "StringNode",
"lineno": 3,
"colno": 2,
"end_lineno": 3,
"end_colno": 2
},
{
"value": "cpp",
"node": "StringNode",
"lineno": 3,
"colno": 7,
"end_lineno": 3,
"end_colno": 7
},
{
"value": "cython",
"node": "StringNode",
"lineno": 3,
"colno": 14,
"end_lineno": 3,
"end_colno": 14
}
],
"kwargs": [
{
"key": {
"value": "version",
"node": "IdNode",
"lineno": 7,
"colno": 2,
"end_lineno": 7,
"end_colno": 2
},
"val": {
"value": "1.11.0.dev0",
"node": "StringNode",
"lineno": 7,
"colno": 11,
"end_lineno": 7,
"end_colno": 11
}
},
{
"key": {
"value": "license",
"node": "IdNode",
"lineno": 8,
"colno": 2,
"end_lineno": 8,
"end_colno": 2
},
"val": {
"value": "BSD-3",
"node": "StringNode",
"lineno": 8,
"colno": 11,
"end_lineno": 8,
"end_colno": 11
}
},
{
"key": {
"value": "meson_version",
"node": "IdNode",
"lineno": 9,
"colno": 2,
"end_lineno": 9,
"end_colno": 2
},
"val": {
"value": ">= 0.64.0",
"node": "StringNode",
"lineno": 9,
"colno": 17,
"end_lineno": 9,
"end_colno": 17
}
},
{
"key": {
"value": "default_options",
"node": "IdNode",
"lineno": 10,
"colno": 2,
"end_lineno": 10,
"end_colno": 2
},
"val": {
"args": {
"positional": [
{
"value": "buildtype=debugoptimized",
"node": "StringNode",
"lineno": 11,
"colno": 4,
"end_lineno": 11,
"end_colno": 4
},
{
"value": "c_std=c99",
"node": "StringNode",
"lineno": 12,
"colno": 4,
"end_lineno": 12,
"end_colno": 4
},
{
"value": "cpp_std=c++14",
"node": "StringNode",
"lineno": 13,
"colno": 4,
"end_lineno": 13,
"end_colno": 4
},
{
"value": "fortran_std=legacy",
"node": "StringNode",
"lineno": 14,
"colno": 4,
"end_lineno": 14,
"end_colno": 4
},
{
"value": "blas=openblas",
"node": "StringNode",
"lineno": 15,
"colno": 4,
"end_lineno": 15,
"end_colno": 4
},
{
"value": "lapack=openblas",
"node": "StringNode",
"lineno": 16,
"colno": 4,
"end_lineno": 16,
"end_colno": 4
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 11,
"colno": 30,
"end_lineno": 11,
"end_colno": 30
},
"node": "ArrayNode",
"lineno": 10,
"colno": 19,
"end_lineno": 17,
"end_colno": 3
}
}
],
"node": "ArgumentNode",
"lineno": 2,
"colno": 9,
"end_lineno": 2,
"end_colno": 9
},
"name": "project",
"node": "FunctionNode",
"lineno": 1,
"colno": 0,
"end_lineno": 18,
"end_colno": 1
},
{
"value": {
"object": {
"value": "meson",
"node": "IdNode",
"lineno": 20,
"colno": 5,
"end_lineno": 20,
"end_colno": 5
},
"args": {
"positional": [
{
"value": "c",
"node": "StringNode",
"lineno": 20,
"colno": 24,
"end_lineno": 20,
"end_colno": 24
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 20,
"colno": 27,
"end_lineno": 20,
"end_colno": 27
},
"name": "get_compiler",
"node": "MethodNode",
"lineno": 20,
"colno": 11,
"end_lineno": 20,
"end_colno": 11
},
"var_name": "cc",
"node": "AssignmentNode",
"lineno": 20,
"colno": 0,
"end_lineno": 20,
"end_colno": 0
},
{
"value": {
"object": {
"value": "meson",
"node": "IdNode",
"lineno": 21,
"colno": 6,
"end_lineno": 21,
"end_colno": 6
},
"args": {
"positional": [
{
"value": "cpp",
"node": "StringNode",
"lineno": 21,
"colno": 25,
"end_lineno": 21,
"end_colno": 25
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 21,
"colno": 30,
"end_lineno": 21,
"end_colno": 30
},
"name": "get_compiler",
"node": "MethodNode",
"lineno": 21,
"colno": 12,
"end_lineno": 21,
"end_colno": 12
},
"var_name": "cpp",
"node": "AssignmentNode",
"lineno": 21,
"colno": 0,
"end_lineno": 21,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"left": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 24,
"colno": 3,
"end_lineno": 24,
"end_colno": 3
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 24,
"colno": 13,
"end_lineno": 24,
"end_colno": 13
},
"name": "get_id",
"node": "MethodNode",
"lineno": 24,
"colno": 6,
"end_lineno": 24,
"end_colno": 6
},
"right": {
"value": "gcc",
"node": "StringNode",
"lineno": 24,
"colno": 18,
"end_lineno": 24,
"end_colno": 18
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 24,
"colno": 6,
"end_lineno": 24,
"end_colno": 6
},
"block": {
"lines": [
{
"ifs": [
{
"condition": {
"right": {
"object": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 25,
"colno": 9,
"end_lineno": 25,
"end_colno": 9
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 25,
"colno": 20,
"end_lineno": 25,
"end_colno": 20
},
"name": "version",
"node": "MethodNode",
"lineno": 25,
"colno": 12,
"end_lineno": 25,
"end_colno": 12
},
"args": {
"positional": [
{
"value": ">=8.0",
"node": "StringNode",
"lineno": 25,
"colno": 38,
"end_lineno": 25,
"end_colno": 38
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 25,
"colno": 45,
"end_lineno": 25,
"end_colno": 45
},
"name": "version_compare",
"node": "MethodNode",
"lineno": 25,
"colno": 22,
"end_lineno": 25,
"end_colno": 22
},
"node": "NotNode",
"lineno": 25,
"colno": 9,
"end_lineno": 25,
"end_colno": 9
},
"block": {
"lines": [
{
"args": {
"positional": [
{
"value": "SciPy requires GCC >= 8.0",
"node": "StringNode",
"lineno": 26,
"colno": 10,
"end_lineno": 26,
"end_colno": 10
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 26,
"colno": 37,
"end_lineno": 26,
"end_colno": 37
},
"name": "error",
"node": "FunctionNode",
"lineno": 26,
"colno": 4,
"end_lineno": 26,
"end_colno": 38
}
],
"node": "CodeBlockNode",
"lineno": 26,
"colno": 4,
"end_lineno": 26,
"end_colno": 4
},
"node": "IfNode",
"lineno": 25,
"colno": 9,
"end_lineno": 25,
"end_colno": 9
}
],
"else": {
"node": "EmptyNode",
"lineno": 27,
"colno": 2,
"end_lineno": 27,
"end_colno": 2
},
"node": "IfClauseNode",
"lineno": 25,
"colno": 9,
"end_lineno": 25,
"end_colno": 9
}
],
"node": "CodeBlockNode",
"lineno": 25,
"colno": 2,
"end_lineno": 25,
"end_colno": 2
},
"node": "IfNode",
"lineno": 24,
"colno": 6,
"end_lineno": 24,
"end_colno": 6
},
{
"condition": {
"left": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 28,
"colno": 5,
"end_lineno": 28,
"end_colno": 5
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 28,
"colno": 15,
"end_lineno": 28,
"end_colno": 15
},
"name": "get_id",
"node": "MethodNode",
"lineno": 28,
"colno": 8,
"end_lineno": 28,
"end_colno": 8
},
"right": {
"value": "msvc",
"node": "StringNode",
"lineno": 28,
"colno": 20,
"end_lineno": 28,
"end_colno": 20
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 28,
"colno": 8,
"end_lineno": 28,
"end_colno": 8
},
"block": {
"lines": [
{
"ifs": [
{
"condition": {
"right": {
"object": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 29,
"colno": 9,
"end_lineno": 29,
"end_colno": 9
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 29,
"colno": 20,
"end_lineno": 29,
"end_colno": 20
},
"name": "version",
"node": "MethodNode",
"lineno": 29,
"colno": 12,
"end_lineno": 29,
"end_colno": 12
},
"args": {
"positional": [
{
"value": ">=19.20",
"node": "StringNode",
"lineno": 29,
"colno": 38,
"end_lineno": 29,
"end_colno": 38
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 29,
"colno": 47,
"end_lineno": 29,
"end_colno": 47
},
"name": "version_compare",
"node": "MethodNode",
"lineno": 29,
"colno": 22,
"end_lineno": 29,
"end_colno": 22
},
"node": "NotNode",
"lineno": 29,
"colno": 9,
"end_lineno": 29,
"end_colno": 9
},
"block": {
"lines": [
{
"args": {
"positional": [
{
"left": {
"value": "SciPy requires at least vc142 (default with Visual Studio 2019) ",
"node": "StringNode",
"lineno": 30,
"colno": 10,
"end_lineno": 30,
"end_colno": 10
},
"right": {
"value": "when building with MSVC",
"node": "StringNode",
"lineno": 31,
"colno": 10,
"end_lineno": 31,
"end_colno": 10
},
"op": "+",
"node": "ArithmeticNode",
"lineno": 30,
"colno": 10,
"end_lineno": 30,
"end_colno": 10
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 31,
"colno": 35,
"end_lineno": 31,
"end_colno": 35
},
"name": "error",
"node": "FunctionNode",
"lineno": 30,
"colno": 4,
"end_lineno": 31,
"end_colno": 36
}
],
"node": "CodeBlockNode",
"lineno": 30,
"colno": 4,
"end_lineno": 30,
"end_colno": 4
},
"node": "IfNode",
"lineno": 29,
"colno": 9,
"end_lineno": 29,
"end_colno": 9
}
],
"else": {
"node": "EmptyNode",
"lineno": 32,
"colno": 2,
"end_lineno": 32,
"end_colno": 2
},
"node": "IfClauseNode",
"lineno": 29,
"colno": 9,
"end_lineno": 29,
"end_colno": 9
}
],
"node": "CodeBlockNode",
"lineno": 29,
"colno": 2,
"end_lineno": 29,
"end_colno": 2
},
"node": "IfNode",
"lineno": 28,
"colno": 8,
"end_lineno": 28,
"end_colno": 8
}
],
"else": {
"node": "EmptyNode",
"lineno": 33,
"colno": 0,
"end_lineno": 33,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 24,
"colno": 6,
"end_lineno": 24,
"end_colno": 6
},
{
"value": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 37,
"colno": 17,
"end_lineno": 37,
"end_colno": 17
},
"args": {
"positional": [
{
"value": "-Wno-unused-but-set-variable",
"node": "StringNode",
"lineno": 38,
"colno": 2,
"end_lineno": 38,
"end_colno": 2
},
{
"value": "-Wno-unused-function",
"node": "StringNode",
"lineno": 39,
"colno": 2,
"end_lineno": 39,
"end_colno": 2
},
{
"value": "-Wno-conversion",
"node": "StringNode",
"lineno": 40,
"colno": 2,
"end_lineno": 40,
"end_colno": 2
},
{
"value": "-Wno-misleading-indentation",
"node": "StringNode",
"lineno": 41,
"colno": 2,
"end_lineno": 41,
"end_colno": 2
},
{
"value": "-Wno-incompatible-pointer-types",
"node": "StringNode",
"lineno": 42,
"colno": 2,
"end_lineno": 42,
"end_colno": 2
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 38,
"colno": 32,
"end_lineno": 38,
"end_colno": 32
},
"name": "get_supported_arguments",
"node": "MethodNode",
"lineno": 37,
"colno": 20,
"end_lineno": 37,
"end_colno": 20
},
"var_name": "_global_c_args",
"node": "AssignmentNode",
"lineno": 37,
"colno": 0,
"end_lineno": 37,
"end_colno": 0
},
{
"args": {
"positional": [
{
"value": "_global_c_args",
"node": "IdNode",
"lineno": 44,
"colno": 22,
"end_lineno": 44,
"end_colno": 22
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 44,
"colno": 38,
"end_lineno": 44,
"end_colno": 38
},
"val": {
"value": "c",
"node": "StringNode",
"lineno": 44,
"colno": 49,
"end_lineno": 44,
"end_colno": 49
}
}
],
"node": "ArgumentNode",
"lineno": 44,
"colno": 36,
"end_lineno": 44,
"end_colno": 36
},
"name": "add_project_arguments",
"node": "FunctionNode",
"lineno": 44,
"colno": 0,
"end_lineno": 44,
"end_colno": 53
},
{
"value": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 49,
"colno": 8,
"end_lineno": 49,
"end_colno": 8
},
"args": {
"positional": [
{
"value": "m",
"node": "StringNode",
"lineno": 49,
"colno": 24,
"end_lineno": 49,
"end_colno": 24
}
],
"kwargs": [
{
"key": {
"value": "required",
"node": "IdNode",
"lineno": 49,
"colno": 29,
"end_lineno": 49,
"end_colno": 29
},
"val": {
"value": false,
"node": "BooleanNode",
"lineno": 49,
"colno": 40,
"end_lineno": 49,
"end_colno": 40
}
}
],
"node": "ArgumentNode",
"lineno": 49,
"colno": 27,
"end_lineno": 49,
"end_colno": 27
},
"name": "find_library",
"node": "MethodNode",
"lineno": 49,
"colno": 11,
"end_lineno": 49,
"end_colno": 11
},
"var_name": "m_dep",
"node": "AssignmentNode",
"lineno": 49,
"colno": 0,
"end_lineno": 49,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"object": {
"value": "m_dep",
"node": "IdNode",
"lineno": 50,
"colno": 3,
"end_lineno": 50,
"end_colno": 3
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 50,
"colno": 15,
"end_lineno": 50,
"end_colno": 15
},
"name": "found",
"node": "MethodNode",
"lineno": 50,
"colno": 9,
"end_lineno": 50,
"end_colno": 9
},
"block": {
"lines": [
{
"args": {
"positional": [
{
"value": "-lm",
"node": "StringNode",
"lineno": 51,
"colno": 29,
"end_lineno": 51,
"end_colno": 29
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 51,
"colno": 36,
"end_lineno": 51,
"end_colno": 36
},
"val": {
"value": "c",
"node": "StringNode",
"lineno": 51,
"colno": 47,
"end_lineno": 51,
"end_colno": 47
}
}
],
"node": "ArgumentNode",
"lineno": 51,
"colno": 34,
"end_lineno": 51,
"end_colno": 34
},
"name": "add_project_link_arguments",
"node": "FunctionNode",
"lineno": 51,
"colno": 2,
"end_lineno": 51,
"end_colno": 51
}
],
"node": "CodeBlockNode",
"lineno": 51,
"colno": 2,
"end_lineno": 51,
"end_colno": 2
},
"node": "IfNode",
"lineno": 50,
"colno": 9,
"end_lineno": 50,
"end_colno": 9
}
],
"else": {
"node": "EmptyNode",
"lineno": 52,
"colno": 0,
"end_lineno": 52,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 50,
"colno": 9,
"end_lineno": 50,
"end_colno": 9
},
{
"ifs": [
{
"condition": {
"left": {
"object": {
"value": "host_machine",
"node": "IdNode",
"lineno": 54,
"colno": 3,
"end_lineno": 54,
"end_colno": 3
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 54,
"colno": 23,
"end_lineno": 54,
"end_colno": 23
},
"name": "system",
"node": "MethodNode",
"lineno": 54,
"colno": 16,
"end_lineno": 54,
"end_colno": 16
},
"right": {
"value": "os400",
"node": "StringNode",
"lineno": 54,
"colno": 28,
"end_lineno": 54,
"end_colno": 28
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 54,
"colno": 16,
"end_lineno": 54,
"end_colno": 16
},
"block": {
"lines": [
{
"args": {
"positional": [
{
"value": "-D__STDC_FORMAT_MACROS",
"node": "StringNode",
"lineno": 56,
"colno": 24,
"end_lineno": 56,
"end_colno": 24
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 56,
"colno": 50,
"end_lineno": 56,
"end_colno": 50
},
"val": {
"value": "cpp",
"node": "StringNode",
"lineno": 56,
"colno": 61,
"end_lineno": 56,
"end_colno": 61
}
}
],
"node": "ArgumentNode",
"lineno": 56,
"colno": 48,
"end_lineno": 56,
"end_colno": 48
},
"name": "add_project_arguments",
"node": "FunctionNode",
"lineno": 56,
"colno": 2,
"end_lineno": 56,
"end_colno": 67
},
{
"args": {
"positional": [
{
"value": "-Wl,-bnotextro",
"node": "StringNode",
"lineno": 57,
"colno": 29,
"end_lineno": 57,
"end_colno": 29
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 57,
"colno": 47,
"end_lineno": 57,
"end_colno": 47
},
"val": {
"value": "c",
"node": "StringNode",
"lineno": 57,
"colno": 58,
"end_lineno": 57,
"end_colno": 58
}
}
],
"node": "ArgumentNode",
"lineno": 57,
"colno": 45,
"end_lineno": 57,
"end_colno": 45
},
"name": "add_project_link_arguments",
"node": "FunctionNode",
"lineno": 57,
"colno": 2,
"end_lineno": 57,
"end_colno": 62
},
{
"args": {
"positional": [
{
"value": "-Wl,-bnotextro",
"node": "StringNode",
"lineno": 58,
"colno": 29,
"end_lineno": 58,
"end_colno": 29
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 58,
"colno": 47,
"end_lineno": 58,
"end_colno": 47
},
"val": {
"value": "cpp",
"node": "StringNode",
"lineno": 58,
"colno": 58,
"end_lineno": 58,
"end_colno": 58
}
}
],
"node": "ArgumentNode",
"lineno": 58,
"colno": 45,
"end_lineno": 58,
"end_colno": 45
},
"name": "add_project_link_arguments",
"node": "FunctionNode",
"lineno": 58,
"colno": 2,
"end_lineno": 58,
"end_colno": 64
},
{
"args": {
"positional": [
{
"value": "-Wl,-bnotextro",
"node": "StringNode",
"lineno": 59,
"colno": 29,
"end_lineno": 59,
"end_colno": 29
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 59,
"colno": 47,
"end_lineno": 59,
"end_colno": 47
},
"val": {
"value": "fortran",
"node": "StringNode",
"lineno": 59,
"colno": 58,
"end_lineno": 59,
"end_colno": 58
}
}
],
"node": "ArgumentNode",
"lineno": 59,
"colno": 45,
"end_lineno": 59,
"end_colno": 45
},
"name": "add_project_link_arguments",
"node": "FunctionNode",
"lineno": 59,
"colno": 2,
"end_lineno": 59,
"end_colno": 68
}
],
"node": "CodeBlockNode",
"lineno": 55,
"colno": 61,
"end_lineno": 55,
"end_colno": 61
},
"node": "IfNode",
"lineno": 54,
"colno": 16,
"end_lineno": 54,
"end_colno": 16
}
],
"else": {
"node": "EmptyNode",
"lineno": 60,
"colno": 0,
"end_lineno": 60,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 54,
"colno": 16,
"end_lineno": 54,
"end_colno": 16
},
{
"args": {
"positional": [
{
"value": "fortran",
"node": "StringNode",
"lineno": 63,
"colno": 14,
"end_lineno": 63,
"end_colno": 14
}
],
"kwargs": [
{
"key": {
"value": "native",
"node": "IdNode",
"lineno": 63,
"colno": 25,
"end_lineno": 63,
"end_colno": 25
},
"val": {
"value": false,
"node": "BooleanNode",
"lineno": 63,
"colno": 33,
"end_lineno": 63,
"end_colno": 33
}
}
],
"node": "ArgumentNode",
"lineno": 63,
"colno": 23,
"end_lineno": 63,
"end_colno": 23
},
"name": "add_languages",
"node": "FunctionNode",
"lineno": 63,
"colno": 0,
"end_lineno": 63,
"end_colno": 39
},
{
"value": {
"object": {
"value": "meson",
"node": "IdNode",
"lineno": 64,
"colno": 5,
"end_lineno": 64,
"end_colno": 5
},
"args": {
"positional": [
{
"value": "fortran",
"node": "StringNode",
"lineno": 64,
"colno": 24,
"end_lineno": 64,
"end_colno": 24
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 64,
"colno": 33,
"end_lineno": 64,
"end_colno": 33
},
"name": "get_compiler",
"node": "MethodNode",
"lineno": 64,
"colno": 11,
"end_lineno": 64,
"end_colno": 11
},
"var_name": "ff",
"node": "AssignmentNode",
"lineno": 64,
"colno": 0,
"end_lineno": 64,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 65,
"colno": 3,
"end_lineno": 65,
"end_colno": 3
},
"args": {
"positional": [
{
"value": "-Wno-conversion",
"node": "StringNode",
"lineno": 65,
"colno": 19,
"end_lineno": 65,
"end_colno": 19
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 65,
"colno": 36,
"end_lineno": 65,
"end_colno": 36
},
"name": "has_argument",
"node": "MethodNode",
"lineno": 65,
"colno": 6,
"end_lineno": 65,
"end_colno": 6
},
"block": {
"lines": [
{
"args": {
"positional": [
{
"value": "-Wno-conversion",
"node": "StringNode",
"lineno": 66,
"colno": 24,
"end_lineno": 66,
"end_colno": 24
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 66,
"colno": 43,
"end_lineno": 66,
"end_colno": 43
},
"val": {
"value": "fortran",
"node": "StringNode",
"lineno": 66,
"colno": 53,
"end_lineno": 66,
"end_colno": 53
}
}
],
"node": "ArgumentNode",
"lineno": 66,
"colno": 41,
"end_lineno": 66,
"end_colno": 41
},
"name": "add_project_arguments",
"node": "FunctionNode",
"lineno": 66,
"colno": 2,
"end_lineno": 66,
"end_colno": 63
}
],
"node": "CodeBlockNode",
"lineno": 66,
"colno": 2,
"end_lineno": 66,
"end_colno": 2
},
"node": "IfNode",
"lineno": 65,
"colno": 6,
"end_lineno": 65,
"end_colno": 6
}
],
"else": {
"node": "EmptyNode",
"lineno": 67,
"colno": 0,
"end_lineno": 67,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 65,
"colno": 6,
"end_lineno": 65,
"end_colno": 6
},
{
"value": {
"left": {
"object": {
"value": "host_machine",
"node": "IdNode",
"lineno": 69,
"colno": 13,
"end_lineno": 69,
"end_colno": 13
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 69,
"colno": 33,
"end_lineno": 69,
"end_colno": 33
},
"name": "system",
"node": "MethodNode",
"lineno": 69,
"colno": 26,
"end_lineno": 69,
"end_colno": 26
},
"right": {
"value": "windows",
"node": "StringNode",
"lineno": 69,
"colno": 38,
"end_lineno": 69,
"end_colno": 38
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 69,
"colno": 26,
"end_lineno": 69,
"end_colno": 26
},
"var_name": "is_windows",
"node": "AssignmentNode",
"lineno": 69,
"colno": 0,
"end_lineno": 69,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 77,
"colno": 17,
"end_lineno": 77,
"end_colno": 17
},
"node": "ArrayNode",
"lineno": 77,
"colno": 16,
"end_lineno": 77,
"end_colno": 18
},
"var_name": "_intel_cflags",
"node": "AssignmentNode",
"lineno": 77,
"colno": 0,
"end_lineno": 77,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 78,
"colno": 17,
"end_lineno": 78,
"end_colno": 17
},
"node": "ArrayNode",
"lineno": 78,
"colno": 16,
"end_lineno": 78,
"end_colno": 18
},
"var_name": "_intel_fflags",
"node": "AssignmentNode",
"lineno": 78,
"colno": 0,
"end_lineno": 78,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"left": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 79,
"colno": 3,
"end_lineno": 79,
"end_colno": 3
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 79,
"colno": 13,
"end_lineno": 79,
"end_colno": 13
},
"name": "get_id",
"node": "MethodNode",
"lineno": 79,
"colno": 6,
"end_lineno": 79,
"end_colno": 6
},
"right": {
"value": "intel",
"node": "StringNode",
"lineno": 79,
"colno": 18,
"end_lineno": 79,
"end_colno": 18
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 79,
"colno": 6,
"end_lineno": 79,
"end_colno": 6
},
"block": {
"lines": [
{
"value": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 80,
"colno": 19,
"end_lineno": 80,
"end_colno": 19
},
"args": {
"positional": [
{
"value": "-fp-model=strict",
"node": "StringNode",
"lineno": 80,
"colno": 46,
"end_lineno": 80,
"end_colno": 46
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 80,
"colno": 64,
"end_lineno": 80,
"end_colno": 64
},
"name": "get_supported_arguments",
"node": "MethodNode",
"lineno": 80,
"colno": 22,
"end_lineno": 80,
"end_colno": 22
},
"var_name": "_intel_cflags",
"node": "PlusAssignmentNode",
"lineno": 80,
"colno": 2,
"end_lineno": 80,
"end_colno": 2
}
],
"node": "CodeBlockNode",
"lineno": 80,
"colno": 2,
"end_lineno": 80,
"end_colno": 2
},
"node": "IfNode",
"lineno": 79,
"colno": 6,
"end_lineno": 79,
"end_colno": 6
},
{
"condition": {
"left": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 81,
"colno": 5,
"end_lineno": 81,
"end_colno": 5
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 81,
"colno": 15,
"end_lineno": 81,
"end_colno": 15
},
"name": "get_id",
"node": "MethodNode",
"lineno": 81,
"colno": 8,
"end_lineno": 81,
"end_colno": 8
},
"right": {
"value": "intel-cl",
"node": "StringNode",
"lineno": 81,
"colno": 20,
"end_lineno": 81,
"end_colno": 20
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 81,
"colno": 8,
"end_lineno": 81,
"end_colno": 8
},
"block": {
"lines": [
{
"value": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 82,
"colno": 19,
"end_lineno": 82,
"end_colno": 19
},
"args": {
"positional": [
{
"value": "/fp:strict",
"node": "StringNode",
"lineno": 82,
"colno": 46,
"end_lineno": 82,
"end_colno": 46
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 82,
"colno": 58,
"end_lineno": 82,
"end_colno": 58
},
"name": "get_supported_arguments",
"node": "MethodNode",
"lineno": 82,
"colno": 22,
"end_lineno": 82,
"end_colno": 22
},
"var_name": "_intel_cflags",
"node": "PlusAssignmentNode",
"lineno": 82,
"colno": 2,
"end_lineno": 82,
"end_colno": 2
}
],
"node": "CodeBlockNode",
"lineno": 82,
"colno": 2,
"end_lineno": 82,
"end_colno": 2
},
"node": "IfNode",
"lineno": 81,
"colno": 8,
"end_lineno": 81,
"end_colno": 8
}
],
"else": {
"node": "EmptyNode",
"lineno": 83,
"colno": 0,
"end_lineno": 83,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 79,
"colno": 6,
"end_lineno": 79,
"end_colno": 6
},
{
"ifs": [
{
"condition": {
"left": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 84,
"colno": 3,
"end_lineno": 84,
"end_colno": 3
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 84,
"colno": 13,
"end_lineno": 84,
"end_colno": 13
},
"name": "get_id",
"node": "MethodNode",
"lineno": 84,
"colno": 6,
"end_lineno": 84,
"end_colno": 6
},
"right": {
"value": "intel",
"node": "StringNode",
"lineno": 84,
"colno": 18,
"end_lineno": 84,
"end_colno": 18
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 84,
"colno": 6,
"end_lineno": 84,
"end_colno": 6
},
"block": {
"lines": [
{
"value": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 85,
"colno": 18,
"end_lineno": 85,
"end_colno": 18
},
"args": {
"positional": [
{
"value": "-fp-model=strict",
"node": "StringNode",
"lineno": 85,
"colno": 45,
"end_lineno": 85,
"end_colno": 45
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 85,
"colno": 63,
"end_lineno": 85,
"end_colno": 63
},
"name": "get_supported_arguments",
"node": "MethodNode",
"lineno": 85,
"colno": 21,
"end_lineno": 85,
"end_colno": 21
},
"var_name": "_intel_fflags",
"node": "AssignmentNode",
"lineno": 85,
"colno": 2,
"end_lineno": 85,
"end_colno": 2
},
{
"value": {
"args": {
"positional": [
{
"value": "-assume",
"node": "StringNode",
"lineno": 86,
"colno": 16,
"end_lineno": 86,
"end_colno": 16
},
{
"value": "minus0",
"node": "StringNode",
"lineno": 86,
"colno": 27,
"end_lineno": 86,
"end_colno": 27
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 86,
"colno": 25,
"end_lineno": 86,
"end_colno": 25
},
"node": "ArrayNode",
"lineno": 86,
"colno": 15,
"end_lineno": 86,
"end_colno": 36
},
"var_name": "minus0_arg",
"node": "AssignmentNode",
"lineno": 86,
"colno": 2,
"end_lineno": 86,
"end_colno": 2
},
{
"ifs": [
{
"condition": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 87,
"colno": 5,
"end_lineno": 87,
"end_colno": 5
},
"args": {
"positional": [
{
"value": "minus0_arg",
"node": "IdNode",
"lineno": 87,
"colno": 28,
"end_lineno": 87,
"end_colno": 28
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 87,
"colno": 38,
"end_lineno": 87,
"end_colno": 38
},
"name": "has_multi_arguments",
"node": "MethodNode",
"lineno": 87,
"colno": 8,
"end_lineno": 87,
"end_colno": 8
},
"block": {
"lines": [
{
"value": {
"value": "minus0_arg",
"node": "IdNode",
"lineno": 88,
"colno": 21,
"end_lineno": 88,
"end_colno": 21
},
"var_name": "_intel_fflags",
"node": "PlusAssignmentNode",
"lineno": 88,
"colno": 4,
"end_lineno": 88,
"end_colno": 4
}
],
"node": "CodeBlockNode",
"lineno": 88,
"colno": 4,
"end_lineno": 88,
"end_colno": 4
},
"node": "IfNode",
"lineno": 87,
"colno": 8,
"end_lineno": 87,
"end_colno": 8
}
],
"else": {
"node": "EmptyNode",
"lineno": 89,
"colno": 2,
"end_lineno": 89,
"end_colno": 2
},
"node": "IfClauseNode",
"lineno": 87,
"colno": 8,
"end_lineno": 87,
"end_colno": 8
}
],
"node": "CodeBlockNode",
"lineno": 85,
"colno": 2,
"end_lineno": 85,
"end_colno": 2
},
"node": "IfNode",
"lineno": 84,
"colno": 6,
"end_lineno": 84,
"end_colno": 6
},
{
"condition": {
"left": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 90,
"colno": 5,
"end_lineno": 90,
"end_colno": 5
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 90,
"colno": 15,
"end_lineno": 90,
"end_colno": 15
},
"name": "get_id",
"node": "MethodNode",
"lineno": 90,
"colno": 8,
"end_lineno": 90,
"end_colno": 8
},
"right": {
"value": "intel-cl",
"node": "StringNode",
"lineno": 90,
"colno": 20,
"end_lineno": 90,
"end_colno": 20
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 90,
"colno": 8,
"end_lineno": 90,
"end_colno": 8
},
"block": {
"lines": [
{
"value": {
"object": {
"value": "ff",
"node": "IdNode",
"lineno": 93,
"colno": 18,
"end_lineno": 93,
"end_colno": 18
},
"args": {
"positional": [
{
"value": "/fp:strict",
"node": "StringNode",
"lineno": 94,
"colno": 4,
"end_lineno": 94,
"end_colno": 4
},
{
"value": "/MD",
"node": "StringNode",
"lineno": 94,
"colno": 18,
"end_lineno": 94,
"end_colno": 18
},
{
"value": "/names:lowercase",
"node": "StringNode",
"lineno": 94,
"colno": 25,
"end_lineno": 94,
"end_colno": 25
},
{
"value": "/assume:underscore",
"node": "StringNode",
"lineno": 94,
"colno": 45,
"end_lineno": 94,
"end_colno": 45
},
{
"value": "/assume:minus0",
"node": "StringNode",
"lineno": 95,
"colno": 4,
"end_lineno": 95,
"end_colno": 4
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 94,
"colno": 16,
"end_lineno": 94,
"end_colno": 16
},
"name": "get_supported_arguments",
"node": "MethodNode",
"lineno": 93,
"colno": 21,
"end_lineno": 93,
"end_colno": 21
},
"var_name": "_intel_fflags",
"node": "AssignmentNode",
"lineno": 93,
"colno": 2,
"end_lineno": 93,
"end_colno": 2
}
],
"node": "CodeBlockNode",
"lineno": 91,
"colno": 71,
"end_lineno": 91,
"end_colno": 71
},
"node": "IfNode",
"lineno": 90,
"colno": 8,
"end_lineno": 90,
"end_colno": 8
}
],
"else": {
"node": "EmptyNode",
"lineno": 97,
"colno": 0,
"end_lineno": 97,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 84,
"colno": 6,
"end_lineno": 84,
"end_colno": 6
},
{
"args": {
"positional": [
{
"value": "_intel_cflags",
"node": "IdNode",
"lineno": 98,
"colno": 22,
"end_lineno": 98,
"end_colno": 22
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 98,
"colno": 37,
"end_lineno": 98,
"end_colno": 37
},
"val": {
"args": {
"positional": [
{
"value": "c",
"node": "StringNode",
"lineno": 98,
"colno": 48,
"end_lineno": 98,
"end_colno": 48
},
{
"value": "cpp",
"node": "StringNode",
"lineno": 98,
"colno": 53,
"end_lineno": 98,
"end_colno": 53
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 98,
"colno": 51,
"end_lineno": 98,
"end_colno": 51
},
"node": "ArrayNode",
"lineno": 98,
"colno": 47,
"end_lineno": 98,
"end_colno": 59
}
}
],
"node": "ArgumentNode",
"lineno": 98,
"colno": 35,
"end_lineno": 98,
"end_colno": 35
},
"name": "add_project_arguments",
"node": "FunctionNode",
"lineno": 98,
"colno": 0,
"end_lineno": 98,
"end_colno": 60
},
{
"args": {
"positional": [
{
"value": "_intel_fflags",
"node": "IdNode",
"lineno": 99,
"colno": 22,
"end_lineno": 99,
"end_colno": 22
}
],
"kwargs": [
{
"key": {
"value": "language",
"node": "IdNode",
"lineno": 99,
"colno": 37,
"end_lineno": 99,
"end_colno": 37
},
"val": {
"value": "fortran",
"node": "StringNode",
"lineno": 99,
"colno": 47,
"end_lineno": 99,
"end_colno": 47
}
}
],
"node": "ArgumentNode",
"lineno": 99,
"colno": 35,
"end_lineno": 99,
"end_colno": 35
},
"name": "add_project_arguments",
"node": "FunctionNode",
"lineno": 99,
"colno": 0,
"end_lineno": 99,
"end_colno": 57
},
{
"value": {
"left": {
"object": {
"value": "meson",
"node": "IdNode",
"lineno": 106,
"colno": 17,
"end_lineno": 106,
"end_colno": 17
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 106,
"colno": 43,
"end_lineno": 106,
"end_colno": 43
},
"name": "project_source_root",
"node": "MethodNode",
"lineno": 106,
"colno": 23,
"end_lineno": 106,
"end_colno": 23
},
"right": {
"value": "scipy/_build_utils/link-version-pyinit.map",
"node": "StringNode",
"lineno": 106,
"colno": 47,
"end_lineno": 106,
"end_colno": 47
},
"op": "/",
"node": "ArithmeticNode",
"lineno": 106,
"colno": 23,
"end_lineno": 106,
"end_colno": 23
},
"var_name": "_linker_script",
"node": "AssignmentNode",
"lineno": 106,
"colno": 0,
"end_lineno": 106,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [
{
"left": {
"value": "-Wl,--version-script=",
"node": "StringNode",
"lineno": 107,
"colno": 21,
"end_lineno": 107,
"end_colno": 21
},
"right": {
"value": "_linker_script",
"node": "IdNode",
"lineno": 107,
"colno": 47,
"end_lineno": 107,
"end_colno": 47
},
"op": "+",
"node": "ArithmeticNode",
"lineno": 107,
"colno": 21,
"end_lineno": 107,
"end_colno": 21
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 107,
"colno": 61,
"end_lineno": 107,
"end_colno": 61
},
"node": "ArrayNode",
"lineno": 107,
"colno": 20,
"end_lineno": 107,
"end_colno": 62
},
"var_name": "version_link_args",
"node": "AssignmentNode",
"lineno": 107,
"colno": 0,
"end_lineno": 107,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"right": {
"object": {
"value": "cc",
"node": "IdNode",
"lineno": 111,
"colno": 7,
"end_lineno": 111,
"end_colno": 7
},
"args": {
"positional": [
{
"value": "",
"node": "StringNode",
"lineno": 111,
"colno": 16,
"end_lineno": 111,
"end_colno": 16
}
],
"kwargs": [
{
"key": {
"value": "name",
"node": "IdNode",
"lineno": 111,
"colno": 20,
"end_lineno": 111,
"end_colno": 20
},
"val": {
"value": "-Wl,--version-script",
"node": "StringNode",
"lineno": 111,
"colno": 26,
"end_lineno": 111,
"end_colno": 26
}
},
{
"key": {
"value": "args",
"node": "IdNode",
"lineno": 111,
"colno": 50,
"end_lineno": 111,
"end_colno": 50
},
"val": {
"args": {
"positional": [
{
"value": "-shared",
"node": "StringNode",
"lineno": 111,
"colno": 57,
"end_lineno": 111,
"end_colno": 57
},
{
"value": "version_link_args",
"node": "IdNode",
"lineno": 111,
"colno": 68,
"end_lineno": 111,
"end_colno": 68
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 111,
"colno": 66,
"end_lineno": 111,
"end_colno": 66
},
"node": "ArrayNode",
"lineno": 111,
"colno": 56,
"end_lineno": 111,
"end_colno": 86
}
}
],
"node": "ArgumentNode",
"lineno": 111,
"colno": 18,
"end_lineno": 111,
"end_colno": 18
},
"name": "links",
"node": "MethodNode",
"lineno": 111,
"colno": 10,
"end_lineno": 111,
"end_colno": 10
},
"node": "NotNode",
"lineno": 111,
"colno": 7,
"end_lineno": 111,
"end_colno": 7
},
"block": {
"lines": [
{
"value": {
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 112,
"colno": 23,
"end_lineno": 112,
"end_colno": 23
},
"node": "ArrayNode",
"lineno": 112,
"colno": 22,
"end_lineno": 112,
"end_colno": 24
},
"var_name": "version_link_args",
"node": "AssignmentNode",
"lineno": 112,
"colno": 2,
"end_lineno": 112,
"end_colno": 2
}
],
"node": "CodeBlockNode",
"lineno": 112,
"colno": 2,
"end_lineno": 112,
"end_colno": 2
},
"node": "IfNode",
"lineno": 111,
"colno": 7,
"end_lineno": 111,
"end_colno": 7
}
],
"else": {
"node": "EmptyNode",
"lineno": 113,
"colno": 0,
"end_lineno": 113,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 111,
"colno": 7,
"end_lineno": 111,
"end_colno": 7
},
{
"value": {
"args": {
"positional": [
{
"object": {
"object": {
"object": {
"value": "meson",
"node": "IdNode",
"lineno": 116,
"colno": 22,
"end_lineno": 116,
"end_colno": 22
},
"args": {
"positional": [
{
"value": "cython",
"node": "StringNode",
"lineno": 116,
"colno": 41,
"end_lineno": 116,
"end_colno": 41
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 116,
"colno": 49,
"end_lineno": 116,
"end_colno": 49
},
"name": "get_compiler",
"node": "MethodNode",
"lineno": 116,
"colno": 28,
"end_lineno": 116,
"end_colno": 28
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 116,
"colno": 61,
"end_lineno": 116,
"end_colno": 61
},
"name": "cmd_array",
"node": "MethodNode",
"lineno": 116,
"colno": 51,
"end_lineno": 116,
"end_colno": 51
},
"index": {
"value": 0,
"node": "NumberNode",
"lineno": 116,
"colno": 63,
"end_lineno": 116,
"end_colno": 63
},
"node": "IndexNode",
"lineno": 116,
"colno": 51,
"end_lineno": 116,
"end_colno": 51
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 116,
"colno": 65,
"end_lineno": 116,
"end_colno": 65
},
"name": "find_program",
"node": "FunctionNode",
"lineno": 116,
"colno": 9,
"end_lineno": 116,
"end_colno": 66
},
"var_name": "cython",
"node": "AssignmentNode",
"lineno": 116,
"colno": 0,
"end_lineno": 116,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [
{
"value": "tools/generate_f2pymod.py",
"node": "StringNode",
"lineno": 117,
"colno": 25,
"end_lineno": 117,
"end_colno": 25
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 117,
"colno": 52,
"end_lineno": 117,
"end_colno": 52
},
"name": "files",
"node": "FunctionNode",
"lineno": 117,
"colno": 19,
"end_lineno": 117,
"end_colno": 53
},
"var_name": "generate_f2pymod",
"node": "AssignmentNode",
"lineno": 117,
"colno": 0,
"end_lineno": 117,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [
{
"value": "scipy/_build_utils/tempita.py",
"node": "StringNode",
"lineno": 118,
"colno": 16,
"end_lineno": 118,
"end_colno": 16
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 118,
"colno": 47,
"end_lineno": 118,
"end_colno": 47
},
"name": "files",
"node": "FunctionNode",
"lineno": 118,
"colno": 10,
"end_lineno": 118,
"end_colno": 48
},
"var_name": "tempita",
"node": "AssignmentNode",
"lineno": 118,
"colno": 0,
"end_lineno": 118,
"end_colno": 0
},
{
"value": {
"args": {
"positional": [
{
"value": "python",
"node": "StringNode",
"lineno": 121,
"colno": 16,
"end_lineno": 121,
"end_colno": 16
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 121,
"colno": 24,
"end_lineno": 121,
"end_colno": 24
},
"name": "import",
"node": "FunctionNode",
"lineno": 121,
"colno": 9,
"end_lineno": 121,
"end_colno": 25
},
"var_name": "py_mod",
"node": "AssignmentNode",
"lineno": 121,
"colno": 0,
"end_lineno": 121,
"end_colno": 0
},
{
"value": {
"object": {
"value": "py_mod",
"node": "IdNode",
"lineno": 122,
"colno": 6,
"end_lineno": 122,
"end_colno": 6
},
"args": {
"positional": [],
"kwargs": [
{
"key": {
"value": "pure",
"node": "IdNode",
"lineno": 122,
"colno": 31,
"end_lineno": 122,
"end_colno": 31
},
"val": {
"value": false,
"node": "BooleanNode",
"lineno": 122,
"colno": 37,
"end_lineno": 122,
"end_colno": 37
}
}
],
"node": "ArgumentNode",
"lineno": 122,
"colno": 35,
"end_lineno": 122,
"end_colno": 35
},
"name": "find_installation",
"node": "MethodNode",
"lineno": 122,
"colno": 13,
"end_lineno": 122,
"end_colno": 13
},
"var_name": "py3",
"node": "AssignmentNode",
"lineno": 122,
"colno": 0,
"end_lineno": 122,
"end_colno": 0
},
{
"value": {
"object": {
"value": "py3",
"node": "IdNode",
"lineno": 123,
"colno": 10,
"end_lineno": 123,
"end_colno": 10
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 123,
"colno": 25,
"end_lineno": 123,
"end_colno": 25
},
"name": "dependency",
"node": "MethodNode",
"lineno": 123,
"colno": 14,
"end_lineno": 123,
"end_colno": 14
},
"var_name": "py3_dep",
"node": "AssignmentNode",
"lineno": 123,
"colno": 0,
"end_lineno": 123,
"end_colno": 0
},
{
"value": {
"left": {
"object": {
"object": {
"args": {
"positional": [
{
"value": "py3",
"node": "IdNode",
"lineno": 127,
"colno": 26,
"end_lineno": 127,
"end_colno": 26
},
{
"args": {
"positional": [
{
"value": "-c",
"node": "StringNode",
"lineno": 129,
"colno": 4,
"end_lineno": 129,
"end_colno": 4
},
{
"value": "import os; print(os.environ.get(\"SCIPY_USE_PYTHRAN\", 1))",
"node": "StringNode",
"lineno": 130,
"colno": 4,
"end_lineno": 130,
"end_colno": 4
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 129,
"colno": 8,
"end_lineno": 129,
"end_colno": 8
},
"node": "ArrayNode",
"lineno": 128,
"colno": 2,
"end_lineno": 131,
"end_colno": 3
}
],
"kwargs": [
{
"key": {
"value": "check",
"node": "IdNode",
"lineno": 132,
"colno": 2,
"end_lineno": 132,
"end_colno": 2
},
"val": {
"value": true,
"node": "BooleanNode",
"lineno": 132,
"colno": 9,
"end_lineno": 132,
"end_colno": 9
}
}
],
"node": "ArgumentNode",
"lineno": 127,
"colno": 29,
"end_lineno": 127,
"end_colno": 29
},
"name": "run_command",
"node": "FunctionNode",
"lineno": 127,
"colno": 14,
"end_lineno": 133,
"end_colno": 1
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 133,
"colno": 9,
"end_lineno": 133,
"end_colno": 9
},
"name": "stdout",
"node": "MethodNode",
"lineno": 133,
"colno": 2,
"end_lineno": 133,
"end_colno": 2
},
"args": {
"positional": [],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 133,
"colno": 17,
"end_lineno": 133,
"end_colno": 17
},
"name": "strip",
"node": "MethodNode",
"lineno": 133,
"colno": 11,
"end_lineno": 133,
"end_colno": 11
},
"right": {
"value": "1",
"node": "StringNode",
"lineno": 133,
"colno": 22,
"end_lineno": 133,
"end_colno": 22
},
"ctype": "==",
"node": "ComparisonNode",
"lineno": 133,
"colno": 11,
"end_lineno": 133,
"end_colno": 11
},
"var_name": "use_pythran",
"node": "AssignmentNode",
"lineno": 127,
"colno": 0,
"end_lineno": 127,
"end_colno": 0
},
{
"ifs": [
{
"condition": {
"value": "use_pythran",
"node": "IdNode",
"lineno": 134,
"colno": 3,
"end_lineno": 134,
"end_colno": 3
},
"block": {
"lines": [
{
"value": {
"args": {
"positional": [
{
"value": "pythran",
"node": "StringNode",
"lineno": 135,
"colno": 25,
"end_lineno": 135,
"end_colno": 25
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 135,
"colno": 34,
"end_lineno": 135,
"end_colno": 34
},
"name": "find_program",
"node": "FunctionNode",
"lineno": 135,
"colno": 12,
"end_lineno": 135,
"end_colno": 35
},
"var_name": "pythran",
"node": "AssignmentNode",
"lineno": 135,
"colno": 2,
"end_lineno": 135,
"end_colno": 2
}
],
"node": "CodeBlockNode",
"lineno": 135,
"colno": 2,
"end_lineno": 135,
"end_colno": 2
},
"node": "IfNode",
"lineno": 134,
"colno": 3,
"end_lineno": 134,
"end_colno": 3
}
],
"else": {
"node": "EmptyNode",
"lineno": 136,
"colno": 0,
"end_lineno": 136,
"end_colno": 0
},
"node": "IfClauseNode",
"lineno": 134,
"colno": 3,
"end_lineno": 134,
"end_colno": 3
},
{
"args": {
"positional": [
{
"value": "scipy",
"node": "StringNode",
"lineno": 138,
"colno": 7,
"end_lineno": 138,
"end_colno": 7
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 138,
"colno": 14,
"end_lineno": 138,
"end_colno": 14
},
"name": "subdir",
"node": "FunctionNode",
"lineno": 138,
"colno": 0,
"end_lineno": 138,
"end_colno": 15
}
],
"node": "CodeBlockNode",
"lineno": 1,
"colno": 0,
"end_lineno": 1,
"end_colno": 0
} And sure enough, buried in the middle of that is: {
"key": {
"value": "default_options",
"node": "IdNode",
"lineno": 10,
"colno": 2,
"end_lineno": 10,
"end_colno": 2
},
"val": {
"args": {
"positional": [
{
"value": "buildtype=debugoptimized",
"node": "StringNode",
"lineno": 11,
"colno": 4,
"end_lineno": 11,
"end_colno": 4
},
{
"value": "c_std=c99",
"node": "StringNode",
"lineno": 12,
"colno": 4,
"end_lineno": 12,
"end_colno": 4
},
{
"value": "cpp_std=c++14",
"node": "StringNode",
"lineno": 13,
"colno": 4,
"end_lineno": 13,
"end_colno": 4
},
{
"value": "fortran_std=legacy",
"node": "StringNode",
"lineno": 14,
"colno": 4,
"end_lineno": 14,
"end_colno": 4
},
{
"value": "blas=openblas",
"node": "StringNode",
"lineno": 15,
"colno": 4,
"end_lineno": 15,
"end_colno": 4
},
{
"value": "lapack=openblas",
"node": "StringNode",
"lineno": 16,
"colno": 4,
"end_lineno": 16,
"end_colno": 4
}
],
"kwargs": [],
"node": "ArgumentNode",
"lineno": 11,
"colno": 30,
"end_lineno": 11,
"end_colno": 30
},
"node": "ArrayNode",
"lineno": 10,
"colno": 19,
"end_lineno": 17,
"end_colno": 3
} |
What are the backward and forward compatibility guarantees for the Meson's AST? Anyhow, I don't think meson-python should get into this level of analysis of the Meson build definition. My preference would be to have |
I don't know if there's a formal guarantee, but that code generally does not change even at the bugfix level. We probably do NOT want to change it, though, given that it's the output of a public CLI interface. Another option would be to export that (which options were overridden from meson's own defaults) more thoroughly in the introspection json files, I guess... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, users can disable it right now by just overriding it later. IMO, we should try to optimize for most users, without being too opinionated.
I opened #329 though, regarding allowing users to disable the defaults.
Okay, I'll merge this. We can reconsider if we get any user feedback. IMO overall I think it does make sense that we set defaults different than Meson, because we are optimizing for different scenarios. While in most cases when Meson is used, it'd be by an end user building some project, not releasing, so it optimizes for that situation (eg. defaults the prefix to |
Was any documentation written about this or the users are supposed to discover this starring at the build logs? |
It'll be included in the changelog, but we should add a page for the default options in the docs. |
Yes, agreed - docs should be included with this PR. I will submit a follow-up PR with detailed explanation/guidance in the docs later today - the discussion here has helped clarify a few things. |
This follows up on the `n_debug` default added in mesonbuildgh-325, documents all other default options and they are used, as well as improves the page on using `pyproject.toml` settings.
This follows up on the `n_debug` default added in mesonbuildgh-325, documents all other default options and they are used, as well as improves the page on using `pyproject.toml` settings.
This follows up on the `n_debug` default added in mesonbuildgh-325, documents all other default options and they are used, as well as improves the page on using `pyproject.toml` settings.
This follows up on the `n_debug` default added in mesonbuildgh-325, documents all other default options and they are used, as well as improves the page on using `pyproject.toml` settings.
This follows up on the `n_debug` default added in gh-325, documents all other default options and they are used, as well as improves the page on using `pyproject.toml` settings.
Unfortunately, as things are, I don't think that adding |
Hmm, I tested this by running
and verifying that |
That works for a Meson projects that use a |
NDEBUG
is normally expected to be set for release builds, however for historical reasons Meson does not (yet) toggleNDEBUG
for non-debug builds (which we already default to). So set this as the default. Choosing 'if-release' so that if users are explicitly asking for a debug build via config-settings, they don't see a change in behavior.xref numpy/numpy#22546 (comment)