[omniORB] small omniidl problem
Harri Pasanen
harri.pasanen@trema.com
Thu, 04 Apr 2002 10:31:59 +0200
bjorn rohde jensen wrote:
> Hi guys,
>
> I build the omniORB beta using autoconf and --prefix=/blabla...
> and i seem to have discovered a little problem. I by choice do
> not have any of the omniORB directories in my path, and this
> little problem will not show itself, if one has.
> In lib/python2.1/site-packages/omniidl/main.py the path to
> omnicpp is determined to be lib/python2.1/site-packages/
> instead of just bin/
> The line is:
>
> preprocessor = os.path.join(preprocessor_path, "omnicpp")
>
> I hacked that to read:
>
> preprocessor = os.path.join(preprocessor_path,
> "../../../bin/omnicpp")
>
> Perhaps someone with an understanding of python could come
> up with a better solution?
>
> Yours sincerely,
>
> bjorn
I ran into the same problem.
My fix was to replace above in the same file the lines:
if hasattr(_omniidl, "__file__"):
preprocessor_path = os.path.dirname(_omniidl.__file__)
else:
preprocessor_path = os.path.dirname(sys.argv[0])
with just
preprocessor_path = os.path.dirname(sys.argv[0])
At least on unix platforms that should always work. I'm not sure about
Windows.
-Harri