I develop Windows desktop application with pyside2, in order to protect the source code, I need to compile these tens of .py files into .pyd files. At the beginning, I compiled the project with Nuitka. However, it doesn't support the Qt well enough unless with the paid version. Latter, I started to compile the Python files with Cython, and it worked.
However, a new issue pops up. When the application launches the first time after the Windows system launches, the application will take a long time to show up, even though the process has been started immediately. I guess it's due to the so many DLL files the application depends on that consume the time, because the latter launch of the application is much easier. The system must cache something for launched programs.
So, what if I make the .pyd files less, in which way, the system will spend less time to load necessary dependency for the application. But I don't know how to compile the several or more .py files into only one .pyd file. How?
Try using Cython only by passing all the py files as a parameter and hit run. The code sample is below:
Run this command in terminal python setup.py build_ext --inplace