Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows fix: normalizes extra_incdir, universal_newlines on preproces…
…sor 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.
- Loading branch information