Compiling legacy UAVCAN GUI tool

Hello, I try to compile the legacy GUI tool on Windows (yes, I know about UAVCANv1 and Yukon, but I need UAVCANv0 at the moment), but without success.
The uavcan_gui_tool packages was installed without any problems (only PyQtGraph is not compatible with my Python 3.8, so I had to modify ptime.py), I can start it and it works good.
But when I try to do “bdist_msi” or 'build_exe" I get this error message:

cx_Freeze.common.ConfigError: cannot find file/directory named build\hatched_eggs\uavcan

cx_freeze was installed before compilation.

What could be a reason?

Thank you!

A debugging session is in order. See if the following is executed correctly and if there are any missing outputs in the specified directory:

This directory doesn’t exist: \build\hatched_eggs’
But build approach doesn’t show any errors.
Where have I to find this dir to check?

It is supposed to be created in your current working directory, which should be the root of the repository (that is, where setup.py is). Maybe you should try an older version of Python to see if the problem is version-specific.

What is the best choice? 3.7 or lower?

Try 3.5 first because IIRC it is the latest version that has actually been tested with the old GUI tool.

I have manually copied uavcan directory from site-packages to \build\hatched_eggs, now it is running. But another error:

FileNotFoundError: [Errno 2] No such file or directory: ‘c:\users\anton\appdata\local\programs\python\python38\lib\site-packages\uavcan-1.0.0.dev33-py3.8.egg\uavcan-1.0.0.dev33.dist-info\METADATA’

I have already renamed this directory to “uavcan-1.0.0.dev33.dist-info” because of missing LICENSE file, but METADATA is really missing there.

I don’t really know what is happening there, sorry. I see that you are still using Python 3.8, have you tried an older version?

Hello Pavel, I finally could compile it.

The way with an older Python version was not so really productive, almost every used package must be installed with downgrading option, there are a lot of mutually exclusive dependencies, so I’ve tried to get it to work with my current 3.8 installation.
After a lot of tests I found a right and simple possibility to achieve the goal. I had to downgrade cx_Freeze to 6.1 and to modify setup.py by excluding uavcan package from include_files.

Hope it helps other developers.

1 Like

Hey Anton, I am currently doing the same thing and setup.py bdist_msi fails at build_exe executed by cx_Freeze with:

ImportError: No module named 'uavcan_gui_tool__main__'

There is no typo here: it is literally looking for uavcan_gui_tool__main__ (not uavcan_gui_tool.__main__ which would be understandable).

I tried feeding it an empty stub uavcan_gui_tool__main__.py but it didn’t help. I am using cx_Freeze v6.1 (other versions fail for different reasons). Do you happen to have a suggestion for me here?

Thanks in advance.