Build problems on Python >= 3.8
faultdiagnosistoolbox opened this issue · 2 comments
faultdiagnosistoolbox commented
I have build problems on my Mac (Big Sur) for python versions larger than 3.7. I try to compile the git-version of odes with sundials version 5.8 (since 6.0 changed the API).
It works for Python 3.7 but not for 3.8 and 3.9 and there is something in the build system I think. The error is AttributeError: 'Extension' object has no attribute 'extra_c_compile_args'
and I unfortunately don't know how to solve the problem.
Below is the traceback reporting the error.
Best,
Erik
Traceback (most recent call last):
File "setup.py", line 45, in <module>
setup(
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/numpy/distutils/command/build.py", line 61, in run
old_build.run(self)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/Users/erifr93/tmp/odes_build/odes/setup_build.py", line 338, in run
_build_ext.run(self) # actually do the build
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/numpy/distutils/command/build_ext.py", line 316, in run
self.build_extensions()
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/Users/erifr93/tmp/odes_build/env/lib/python3.8/site-packages/numpy/distutils/command/build_ext.py", line 380, in build_extension
extra_cflags = ext.extra_c_compile_args or []
AttributeError: 'Extension' object has no attribute 'extra_c_compile_args'
aragilar commented
Looks like numpy/numpy#19713 was the cause, I'll see if there's an easy fix.