#166 Bug in setup.py when compiling Python wrapper code

None
closed-fixed
None
5
2014-01-27
2014-01-25
aguelmame
No

On Windows platform, if the INCLUDE environment variable ends with a ';', the statement
:::python
dirs = [dir for dir in os.environ['INCLUDE'].split(';')]

at line 125 of 'setup.py' produces an empty entry, which produces a bug when invoking the complier (en empty -I is passed to the compiler, which causes the next option the be interpreted as an include path. In my case, the next option specifies the source file name, the compiler complained about not finding the source filename). I propose the following replacement :

:::python
dirs = filter(None,[dir for dir in os.environ['INCLUDE'].split(';')])

Discussion

  • Luigi Ballabio
    Luigi Ballabio
    2014-01-27

    • status: open --> closed-fixed
    • assigned_to: Luigi Ballabio
    • Group: -->
     
  • Luigi Ballabio
    Luigi Ballabio
    2014-01-27

    Fixed, thanks.