videlec / pypolymake

Python wrappers for polymake
https://pypi.python.org/pypi/pypolymake
3 stars 5 forks source link

compilation fails with python3 on ubuntu 16.04 #17

Closed apaffenholz closed 7 years ago

apaffenholz commented 7 years ago

python3 seems to add -Wstrict-prototypes as a compiler option which leads to an error during compilation.

I managed to fix this by adding

import distutils.sysconfig
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
    if type(value) == str:
        cfg_vars[key] = value.replace("-Wstrict-prototypes", "")

to setup.py removing the option from gcc (copied from SO) (the solution comes from this stack overflow question)

videlec commented 7 years ago

Should be fixed with 5db46cd