metomi / fab

Flexible build system for scientific software
https://metomi.github.io/fab/
Other
19 stars 11 forks source link

Fix cyclic dependency #314

Open hiker opened 2 weeks ago

hiker commented 2 weeks ago

ATM, in tools/psyclone.py, we have to use:

if TYPE_CHECKING:
    # Otherwise we have a circular dependency:
    # BuildConfig needs ToolBox which imports __init__ which imports this
    from fab.build_config import BuildConfig

And in both cases, (psyclone.py and build_config.py) the import is used for tying, i.e. we can't simple use a local import :(