[omniORB] omniORBpy: Howto install modules independently?

Duncan Grisby duncan at grisby.org
Fri Mar 26 13:34:03 GMT 2004


On Monday 22 March, "W. Borgert" wrote:

> Quoting Duncan Grisby <duncan at grisby.org>:
> > That's a rather tricky situation. To be neat, you could make it so
> > that the install rewrites the __init__.py files in the right way, just
> > like omniidl itself does.
> 
> Could you elaborate a little bit on the algorithm?  omniidl has
> the advantage of knowing the IDL.  At install time, I don't have
> the IDL, because it may not part of the software package.

When you're installing, you'll have an already installed __init__.py
that imports a set of *_idl modules, and a new __init__.py that
imports a possibly overlapping set of *_idl modules. You just need to
build a new one that imports the union of the sets.

> I assume, the best would be a tool 'install-omniORBpy-module'
> called with the name of the _idl.py file and (if necessary) the
> IDL module prefix, like A::B::C.  In addition, I would need an
> uninstall-omniORBpy-module tool.

Uninstall is definitely harder. I'm not sure how you'd do that safely.

> > I possibly simpler solution is to become a bit omniORB specific and
> > directly import the *_idl.py modules before importing the X and Y
> > packages. If you do that, you don't need the X package directory at
> > all.
> 
> I will try that.  I'm not opposed to using omniORB specific
> import statements, because we don't plan using Python-ORBit or
> Fnorb.  Two questions: Do I have to change anything else than
> the import statements in the code?  If I have a lot of nested
> IDL modules, do I have to import every single module?

No, you don't need to change anything except the imports, and you
don't have to import nested modules.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list