[omniORB] Python2.0
Michel Sanner
sanner@scripps.edu
Mon, 15 Oct 2001 14:50:41 -0700 (PDT)
Hello,
we have an application that runs under python2.0 and we would like to use
omniorb.
My first question is what version of omniorb should be used with python2.0 ?
I tried building version 3.0.4 (just to see if it would work) but I ran into
several problems:
1 - The building script assumes that sys.prefix is the same as sys.exec_prefix.
When sys.prefix is different from sys.exec_prefix config.h is found in
sys.exec_prefix/include/python$(VERSION)/ while all the other Python include
files are in sys.prefix/include/python$(VERSION)/. The consequence is that one
has to use -Isys.exec_prefix/include/python$(VERSION)/ AND
-Isys.prefix/include/python$(VERSION)/ on the compilation line of
tool/omniidl/cxx/idlpython.cc
I ended up compiling this file by hand
CC -c -O2 -g -Kpic -DIDLMODULE_VERSION="0x2301"
-I/tsri/python/sun4SunOS5/include/python2.0/
-I/tsri/python/share/include/python2.0/ -DPYTHON_INCLUDE=" <Python.h> " -I.
-I../../../../include -D__sparc__ -D__sunos__ -D__OSVERSION__=5 -o idlpython.o
idlpython.cc
2 - the script in ./bin/<platform>/omniidlrun.py starts with
#!/usr/bin/env python
which assumes that "python" resolves to the proper version of Python. Since you
are asking where the Python interpreter is anyways in the <platfomr>.mk file,
why not use the path to the interpreter that was specified there ?
3 - during gmake export intr ./scr
the make command in src/lib/omniORB2 fails because the python interpreter
invoked by omniidlrun.py does not find _omniidlmodule.so. I added the ./lib
directory to sys.path in omniidlrun.py. I did not want to add it to PYTHONPATH
becaue this variable is seen by all my python interpreters (1.5.2, 2.0, .2.1,
2.2 etc..)
4 - I understand that omniORB uses Python internally. Does this version of
Python have to math the one with which omniORBpy is used ?
Thanks for any help/comments/suggestions with this
-Michel
----------------------------------------------------------------------
Michel F. Sanner Ph.D. The Scripps Research Institute
Assistant Professor Department of Molecular Biology
10550 North Torrey Pines Road
Tel. (858) 784-2341 La Jolla, CA 92037
Fax. (858) 784-2860
sanner@scripps.edu http://www.scripps.edu/sanner
-----------------------------------------------------------------------