-
Notifications
You must be signed in to change notification settings - Fork 20
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
support input files containing spaces #442
Conversation
55657fe
to
b77f5ed
Compare
6ffca47
to
20afd2d
Compare
The problem here was that ninja user-defined build variables (e.g. |
Add conditional dependency on mslex, third party module that adheres to Windows shell quoting rules, unlike shlex which is POSIX only. This lets us correctly support input files with spaces or other special characters on Windows in a way that is compatible with ninja.
the Config.output_file is used to define the filenames of temporary build files which are passed to ninja rule commands as variables, this makes sure things work even when output_file contains spaces
d9bc134
to
605f125
Compare
https://github.com/smoofra/mslex looks like a tiny dead one-man project. I don't think this is a good dependency. Since Python can do things like run windows processes I'd have thought it must have this built-in but if not perhaps we should just write our own little function? |
ok, I removed the dependency on mslex, and went back to using subprocess.list2cmdline for shell quoting on Windows. Whereas for splitting a command line string to list of args, I am now using ctypes to wrap a call into Windows' own |
I'm mildly amazed where this has taken us haha. |
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.
LGTM
Part of fixing #435