Consider the py3-compat branch that removes relative imports. This change seems to expose dependency cycles between COFFEE modules. For example, firedrake-clean fails:
Traceback (most recent call last):
File "/home/mh1714/firedrake/bin/firedrake-clean", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/home/mh1714/firedrake/src/firedrake/scripts/firedrake-clean", line 3, in <module>
from firedrake.tsfc_interface import clear_cache, TSFCKernel
File "/home/mh1714/firedrake/src/firedrake/firedrake/__init__.py", line 26, in <module>
from pyop2 import op2 # noqa
File "/home/mh1714/firedrake/src/PyOP2/pyop2/__init__.py", line 9, in <module>
from op2 import * # noqa
File "/home/mh1714/firedrake/src/PyOP2/pyop2/op2.py", line 48, in <module>
from coffee.system import coffee_init, O0
File "/home/mh1714/firedrake/src/COFFEE/coffee/system.py", line 41, in <module>
from .vectorizer import VectStrategy
File "/home/mh1714/firedrake/src/COFFEE/coffee/vectorizer.py", line 42, in <module>
from . import system
ImportError: cannot import name system
Consider the
py3-compat
branch that removes relative imports. This change seems to expose dependency cycles between COFFEE modules. For example,firedrake-clean
fails: