petercorke / bdsim

Simulate dynamic systems expressed in block diagram form using Python
MIT License
167 stars 32 forks source link

[bdedit Enhancement] Switch from PyQT5 to PySide6? #23

Open Gjacquenot opened 10 months ago

Gjacquenot commented 10 months ago

bdedit relies on PyQt5, which has a GPL license, and that seems to create problems with PyQT5

Here is the license for PyQT5: PyQt5 is released under the GPL v3 license and under a commercial license that allows for the development of proprietary applications.

bdsim has a MIT license, but including PyQT5 makes the application a GPL application, unless buying a commercila license.

An alternative would be to switch from PyQT5 to PySide6

The main notable difference between PyQT5 and PySide6 is licensing — with PyQt6 being available under a GPL or commercial license, and PySide6 under a LGPL license.

The PySide6 wheel is an alias to other two wheels PySide6_Essentials and PySide6_Addons, which contains a predefined list of Qt Modules.

Switching from PyQT to PySide is documented here. Little more complicated than sed -i s/PyQT5/pyside/g source.py but can be done easily...

Moreover, QT recommend to use PySide6.

QTCreator can be used with PySide6.

petercorke commented 10 months ago

I did not know that! I will investigate and fix, but am a bit backlogged at the moment. Do you know if PySide is easier to install on Apple silicon? PyQt5 was a pain.

Gjacquenot commented 10 months ago

I have no experience with Apple Silicon, but some already had the problem and it seems to be fixed as indicated:

So it might be solved...

cmaureir commented 10 months ago

Yes, we support Apple Silicon since 6.2.2+ we have a node in our CI that builds universal wheels which are uploaded to PyPI https://pypi.org/project/PySide6/#files

petercorke commented 10 months ago

I've started this process, but this also involves an effective change from Qt5 to Qt6 which has non trivial changes in methods and enums. Will keep you posted on progress

petercorke commented 1 month ago

Still on my todo list and there is a pyside6 branch but still work to be done.