[reportlab-users] How to include reportlab with product

Andy Robinson reportlab-users@reportlab.com
Thu, 11 Sep 2003 13:25:44 +0100

> Can anybody let me know their opinion on how to try and encapsulate a
> python and all its required modules in a single installation if I want
> to distribute it with my product?
> If this is a bad idea, any suggestions on how to prevent users from
> having to try and install individual tar/deb or whatever packaging
> system they use on linux/windows to get my product working? It is
> obviously desirable to roll out a single product and have it work first
> time around.
> Thanks,
> Pieter
This is probably better for the main Python list or newsgroup,
or the python-help list.  See here for good resources:

There are several standard techniques.  Python has a 'freeze' tool
which works fine on Unix and can bundle up Python itself, your 
top level script and all needed files in one executable.
On Windows there is a better tool called py2exe whch can make
install screens as well.  There is also Gordon McMillan's 'Installer'
which is a more general framework for doing this on Windows
and Linux.  We've had lots of practice and they all work,
given a bit of time to learn your way around.

The main thing to take care of is that your app has to
work fine whether they have zero, one or more copies of
Python on their box already.  The first case is easy,
the others sometimes mean a little care at startup
to make sure that sys.path is what you intended and
that they pick up the copy of reportlab you shipped,
and not the one they were playing with last month.

Good luck,

Andy Robinson