Commit 46a3917
committed
📦Only enable line tracing when w/Cython tracing
This patch modifies the build backend to dynamically enable Cython
line tracing only when explicitly requested via the
`with-cython-tracing=true` config setting. Previously, having
`linetrace = "True"` in `pyproject.toml` was making our PyPI-published
wheels slower.
Now, line tracing is opt-in:
- Regular builds: `pip install .`
(no line tracing)
- Tracing builds:
`pip install . --config-setting=with-cython-tracing=true`
(enables line tracing)
When tracing is requested, the build backend automatically adds the
`linetrace=True` and `profile=True` Cython directives and sets the
appropriate C compiler flags.
Resolves ansible#7671 parent 8679809 commit 46a3917
File tree
4 files changed
+26
-4
lines changed- packaging/pep517_backend
4 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
| 163 | + | |
| 164 | + | |
149 | 165 | | |
150 | 166 | | |
151 | 167 | | |
152 | 168 | | |
153 | 169 | | |
154 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
155 | 178 | | |
156 | 179 | | |
157 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
| |||
0 commit comments