[omniORB] How to distribute OmniORB3 python applications?

Duncan Grisby dgrisby@uk.research.att.com
Wed, 05 Apr 2000 16:37:46 +0100


On Wednesday 5 April, Richard Gruet wrote:

> I wonder what is the minimum set of OmniORB3 + OmniORBpy files required
> for a distribution ? My target installation is under Windows NT and
> composed of Python  programs using exclusively the ORB part of omniORB,
> not the IDL compiler or other stuff.
> In fact my point is to find the easiest way of distributing Python
> programs that make use of OmniORB3. Of course, there is at least two
> alternatives: bundled with Python, or separately. Is it possible to use
> tools like freeze ?

There are various options. The best choice for you depends both on
what exactly you require, and on how much effort you are willing to
put into doing it.

The simplest option is to install the normal Python distribution from
the py152.exe self-extractor. Then put the omniORB C++ and Python
files, plus the Python files for your application where Python can
find them. The files needed by omniORBpy are omniORB300_rt.dll,
_omnipy.pyd, and all of the .py files found in the python subdirectory
of the omniORBpy distribution. Then you'll need the stub files for all
interfaces you use, consisting of the _idl.py files, and the
directories named after the IDL modules. Finally, you'll need the .py
files for your application, of course. Instead of distributing the .py
source files, you could instead distribute the .pyc byte-code compiled
files.

That amounts to quite a lot of files, so there are a few options, of
varying complexity, to cut down on it. One option is to make use of
Greg Stein's imputils and "small" distribution to put all of the .pyc
files in a single archive, plus a small number of other files. We
investigated this idea for distributing omniidl to people who don't
want to care about Python, but decided that it was too much hassle.
You might find it works for you. See Greg's page for info about
imputils and small:

  http://www.lyra.org/greg/python/

If you don't want to install the full Python distribution, you can
work on the minimal omnipython.zip file available from our FTP site.
That contains just the library files required for omniidl to run. You
would have to figure out the minimal set required by your application.
You could either couple this with the imputils approach, or just keep
the .pyc files separate as we do with omnipython.

The most ambitious option would be to create a single executable file
containing frozen copies of all the required .py files from the Python
library, omniORBpy, and your application. You could link that
executable against static versions of omniORB and omniORBpy (which
would require a bit of omniORBpy makefile hacking to make it build a
static version), and against the python15.dll library from Python.
That would cut your application down to only two files. To do this,
you would probably have to manually hack freeze.py's output.

Finally, you could take the previous option and try to figure out how
to link your binary with a static version of Python, resulting in a
single file. I'm not sure if that is possible on Windows.

I hope that helps!

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --