[PyQt] Deploying commercial PyQt app
Stephen Hansen
me at ixokai.io
Thu Oct 23 23:05:13 BST 2014
On Thu, Oct 23, 2014 at 1:31 PM, Petar <petar.djetlic at gmail.com> wrote:
> Stephen Hansen-3 wrote
> > On Thu, Oct 23, 2014 at 11:01 AM, Petar
> > <
> > petar.djetlic at gmail.com
> > >
> > wrote:
> >
> >> - use freeze tools like py2exe or cx_freeze
> >>
> >
> > This. It gets you your exe and pyqt commercial and everything all
> packaged
> > into a directory to distribute, all without exposing pyqt to end users.
> > Its
> > used by almost every commercial Python program I'm aware of. Its not
> > really
> > that complicated and isn't actually specific to pyqt at all.
> >
>
> Thanks. I used py2exe, and it worked ok, but I use a lot of matplotlib
> graphs. I call python scripts from other apps (not PyQt) that generate
> graphs and as strange as it sounds, it is easier for me to have already
> installed python with all dependencies on user's computers (it's really not
> a problem). The alternative is to generate exe for every graph (category).
> It is easier for me just deploying source files.
>
I think its only easier because its what you're used to. You don't have to
do an exe for every script, you could do a single runner exe instead. Put
all your scripts that make graphs into a package, say, "petargraphs" with
an __init__.py in it.
Then make one runner app called "makegraph" that takes a command line
argument which is the name of the script under the package to do. So where
before you called python graph1.py, now you call makegraph graph1.
Then when you freeze up that makegraph exe it'll distribute all your
scripts/packages as pyc and you can include your PyQt libraries and they
can use it and whatever else you use without exposing Python (and thus
PyQt) to the users and therefore abiding (warning: IANAL) by the PyQt
commercial license.
I do something similar in my day job with a very large and complex series
of interconnected apps, though we're currently using a different graphical
toolkit. Its just about changing how you organize things and its mostly a
one time, upfront cost. After you've done that adding new scripts/whatever
is easy.
>
> Are there any problems with py2exe to generate exe for PyQt app?
>
I've only done it experimentally, I'm not actually a commercial customer
yet. But I didn't have any issues.
That said, I use cx_Freeze instead of py2exe.... I'm looking at is PyQt5
and Python 3 as a target, and cx_Freeze supports py3 best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141023/39d5c3eb/attachment.html>
More information about the PyQt
mailing list