Commit 047ea3b
Per Rosengren
Windows fix: normalizes extra_incdir, universal_newlines on preprocessor output.
When input is a filename without directory, the dirname is empty, which inserts `-I `, instead of ` -I .`, which breaks the command.
Remedied with os.path.normpath
On Windows with MinGW gcc, preprocessor output has Windows newlines, which pycparser can't handle.
Remedied by universal_newlines=True for subprocess.
Py3: universal_newlines=True changes `subprocess.communicate` to take and return strings instead of bytes. Adjusted for this.
Current master reads input headers as bytes. This causes `code.encode` to fail. Changed `cli` to open files as text fixes this.
Tested with `test.py` on Python 2.7 and 3.5 on Windows 10.1 parent 064b143 commit 047ea3b
1 file changed
+10
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
313 | 312 | | |
314 | 313 | | |
315 | | - | |
| 314 | + | |
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
| |||
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
331 | | - | |
| 330 | + | |
332 | 331 | | |
333 | 332 | | |
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
338 | | - | |
339 | | - | |
| 337 | + | |
| 338 | + | |
340 | 339 | | |
341 | 340 | | |
0 commit comments