8000 BUG: Fix support for builds with directories that contain whitespace by ddasilva · Pull Request #4421 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix support for builds with directories that contain whitespace #4421

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

Merged
merged 1 commit into from
Mar 5, 2014

Conversation

ddasilva
Copy link
Contributor
@ddasilva ddasilva commented Mar 2, 2014

Fixes #4382. @MichaelAdello reported a build failing for a directory that contained whitespace, and narrowed the problem down to parse_flags(line) not supporting whitespace in directory names.

This PR enables POSIX mode in the lexer, which adds support for quotes and backslash escaping. It also calls quote() on file names where necessary.

Add escaping and quoting of dirs and enabled POSIX support in lexer.

Closes numpy#4382.
@@ -56,7 +58,7 @@ def parse_flags(line):
* 'ignored'

"""
lexer = shlex.shlex(line)
lexer = shlex.shlex(line, posix=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work on Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the shlex module is pure python. Even so I just did a test on windows and can verify it works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for testing. The documentation of the "posix" argument is a bit sparse as to it's effect.

@charris
Copy link
Member
charris commented Mar 5, 2014

Looks generally good to me, but I'm a bit concerned about posix and windows, especially with window using '' instead of '/'.

The Travis failure is unrelated.

@charris
Copy link
Member
charris commented Mar 5, 2014

OK, let's give this a shot. Thanks.

charris added a commit that referenced this pull request Mar 5, 2014
BUG: Fix support for builds with directories that contain whitespace
@charris charris merged commit 94a1c20 into numpy:master Mar 5, 2014
ddasilva pushed a commit to ddasilva/numpy that referenced this pull request Mar 6, 2014
Caused SciPy tests to fail when built with this NumPy.
charris added a commit that referenced this pull request Mar 6, 2014
BUG: Revert PR #4421: causes SciPy tests to fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse_flags fails with whitespaces in directories
2 participants
0