lip6 / coriolis

Coriolis VLSI EDA Tool (LIP6)
https://coriolis.lip6.fr
GNU General Public License v2.0
47 stars 5 forks source link

Flute can't load its data file when in editable install #67

Open robtaylor opened 10 months ago

robtaylor commented 10 months ago

When coriolis is installed as editable (pip3 install -e) flute can't find POWV9.dat and POST9.dat.

jpc-lip6 commented 10 months ago

FLUTE should try to open POWV9.dat and POST9.dat in the coriolis_top directory. To see what's wrong we need to know where they are in the packages and what value is guessed for coriolis_top.

robtaylor commented 10 months ago

This ie due the the logic loading it from coriolis_top, which doesn't seem to exist in a editable install. May be that eventually we need to reorganise into a standard python layout... any ideas for fixing greatly welcomed.

robtaylor commented 10 months ago

Did some research. Basically the fix here is to change all usage of 'coriolis_top' etc (any data file or source loads from within the package) to using importlib.resources. We can use importlib.resources.as_file to get filenames to pull in from C++.

This is also related some what to #66