Skip to content
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

Single quotes around arguments to --cmake-options #169

Closed
robertodr opened this issue Apr 9, 2016 · 7 comments
Closed

Single quotes around arguments to --cmake-options #169

robertodr opened this issue Apr 9, 2016 · 7 comments

Comments

@robertodr
Copy link
Contributor

Copy-pasting the setup command from the setup_command file does not work,
given that the single quotes are removed.

@robertodr
Copy link
Contributor Author

To be more clear:
cat build/setup_command | xclip -sel c followed by pasting gives ERROR: bad input to ./setup.py

@bast
Copy link
Member

bast commented Apr 10, 2016

Confirmed. Will fix it in a short bit.

@bast
Copy link
Member

bast commented Apr 10, 2016

Just found out that it is the shell swallowing those before even Python is called: http://stackoverflow.com/a/19120324

Workaround is additional set of quotes or escaped quotes.

@bast
Copy link
Member

bast commented Apr 10, 2016

I'll leave the issue open until the manual is updated on this.

@miroi
Copy link
Contributor

miroi commented Jan 9, 2018

Ah, this was discussed before...Now I open #224.

@bast
Copy link
Member

bast commented Apr 7, 2020

Looking at it again few years later, the problem is still http://stackoverflow.com/a/19120324.

But then I asked myself, how come it works at all? Under the hood it's docopt parsing the arguments and also docopt gets something without quotes but still figures it out.

What one could is to print arguments from setup to preserve the options and they contain quotes. But they are not exactly what you passed to setup since setup has defaults. So it will be setup flags plus defaults.

@bast
Copy link
Member

bast commented Apr 7, 2020

One thing we could do is to compare values in arguments with substrings in sys.argv and "doctor" those quotes back in.

@bast bast reopened this Apr 7, 2020
robertodr added a commit that referenced this issue Apr 8, 2020
preserve quotes in setup_command; closes #169
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

No branches or pull requests

3 participants