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

double spaces in string #4

Open
sheerluck opened this issue Feb 3, 2022 · 0 comments
Open

double spaces in string #4

sheerluck opened this issue Feb 3, 2022 · 0 comments

Comments

@sheerluck
Copy link

In setup.py the line 22

polymake_cflags = conditional_decode( subprocess.check_output( [ "polymake-config", "--cflags" ] ).strip() ).split(' ')

is based on idea that $ polymake-config --cflags contains only single spaces.
I don't know how that happened, but there are two spaces between -DPOLYMAKE_WITH_FLINT and -DPOLYMAKE_DEBUG=0 on my system :(

$ ipython

In [1]: import sh

In [2]: sh.polymake_config("--cflags").find(" " * 2)
Out[2]: 558

That causes split(' ') to produce

['-DPOLYMAKE_VERSION=406',
 ...
  '-DPOLYMAKE_WITH_FLINT',
 '',                              <----------- empty string
 '-DPOLYMAKE_DEBUG=0\n']

That empty string breaks gcc.
I replaced all three split(' ') with split() and gcc is happy again.

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

1 participant