Skip to content

double spaces in string #4

Description

@sheerluck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions