Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Python Qt application cross-platform: Win, OSX, Linux

We are designing open source UI controller application for Plone CMS. The application itself would be just simple start/stop dialog window for Plone daemon process, mainly aimed for Windows users.

However we are hoping to use the same app for OSX and Linux.

We can create the code for Python Qt application, but we feel unsure about the deployment process. In the optimal case we'd hope to create static builds (.exe for Windows, .dmg for OSX) all megabyte so Qt included for our tiny Python script, just to maximize the ease for the end user.

Are there any examples, scripts, etc. to build Qt friendly installers cross-platform? What other best practices we should consider?

like image 448
Mikko Ohtamaa Avatar asked Oct 09 '22 13:10

Mikko Ohtamaa


2 Answers

PyInstaller is a nice one to create executables and it comes with full PyQt support. It says it can create executables for Windows, OsX and Linux but I've never used it for anything other than Windows. For Windows, it was quite painless and easy.

like image 186
Avaris Avatar answered Oct 12 '22 09:10

Avaris


This doesn't address the packaging/deployment component of your question, but might be a useful side note....
   If you haven't already, you may want to consider PySide for your Python bindings, instead of PyQt. The licensing terms are more permissive (LGPL) than PyQt, and may be more appropriate unless you're commercially licensed.

FWIW, I have successfully used py2app with PySide/Qt4 on the Mac, but don't know if it goes cross platform.

like image 41
Dave Avatar answered Oct 12 '22 11:10

Dave