4 ms·
Lately I've been using Python/PyQt with Nuitka, which transpiles the Python to C++ and then compiles it into a standalone exe + dlls. It (more or less) just wor
by mfgs 11y ago
Lately I've been using Python/PyQt with Nuitka, which transpiles the Python to C++ and then compiles it into a standalone exe + dlls. It (more or less) just works too, very cool indeed!
- kyzyl 11y agoHey -- I've got a question about that use case. So I'm familiar with Nuitka (and all the rest... ugh) but in my brief tests using it I couldn't really get it to work with any of my python code that did anything real. For example, if I had anything that used numpy (which is most of my code) or Qt, or a lib that uses opengl, it would either fail outright saying "can't find blarg" or it would spin forever. Now I understand that the process of transpiling something huge like numpy and then compiling it will be fairly demanding, but I've literally left this stuff running in a tmux session for a day or two and it showed now sign of ever finishing. I'm not asking you to debug my stuff or anything, but have you had a different experience? Is there a trick to getting Nuitka to build code that leverages the python ecosystem? I would really like to figure this out, because the alternatives are really quite terrible, IMO. If Nuitka can be made to work with build times less that a week, I think he's really on to something.
- mfgs 11y agoHuh, strange. My standalone build sucked in numpy and PyQt4 (but not PySide) no troubles at all. I did have a minor problem with ctypes (explicitly importing _ctypes was required), but apart from that surprisingly smooth sailing. I have tried Cython briefly but Nuitka seemed a lot easier; just point and go. No modification to the source code needed and I ended up with a nice .exe and a bunch of .dll and .pyd files (including those for numpy and PyQt4). Build time was 30 minutes for a small-medium size application (25000 lines) in Python 2.7.