Install omniorb python in virtualenv

I am trying to install omniorb in virtualenv for python.

Doing this with the included configure script with omniorb seems rather complicated.

Does anyone know about pip, setup.py or easy_install script for omniorb?

+4
source share
1 answer

Out of curiosity, I just tried this on Ubuntu 10.04. I do not have pip or setup.py solution for you, but it is not too complicated.

I think the secret is to set up the PYTHON variable to configure, in order to point to the python executable in your virtualenv. I built omniORB and omniORBPy from the source and installed them in a directory under my virtualenv (specifying the --prefix option to configure).

Then you need to put the site-packages directory, which is created in the omniORB installation directory on your PYTHONPATH . I decided to do this by creating an omniorb.pth file in my virtualenv site-packages folder (more on this below).

Here is a shell story of what I did. I work from the directory /home/brian/coding/python/virtualenvs . You will have to mentally tune paths, etc. For your environment.

  virtualenv omniORB cd omniORB/ . bin/activate cp /home/brian/Downloads/omni* . tar xvfj omniORB-4.1.6.tar.bz2 tar xvfj omniORBpy-3.6.tar.bz2 mkdir omniORB_install cd omniORB-4.1.6/ mkdir build cd build ../configure --prefix=/home/brian/coding/python/virtualenvs/omniORB/omniORB_install/ PYTHON=/home/brian/coding/python/virtualenvs/omniORB/bin/python make make install cd ../../omniORBpy-3.6/ mkdir build cd build ../configure --prefix=/home/brian/coding/python/virtualenvs/omniORB/omniORB_install/ PYTHON=/home/brian/coding/python/virtualenvs/omniORB/bin/python --with-omniorb=/home/brian/coding/python/virtualenvs/omniORB/omniORB_install/ make make install 

Now here is this omniorb.pth file that I mentioned earlier. Change the directory to the top of your virtual. Create omniorb.pth so that it looks and is located like this:

 $ cat lib/python2.6/site-packages/omniorb.pth /home/brian/coding/python/virtualenvs/omniORB/omniORB_install/lib/python2.6/site-packages 

Now, inside my activated virtualenv:

 $ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import CORBA >>> CORBA.__file__ '/home/brian/coding/python/virtualenvs/omniORB/omniORB_install/lib/python2.6/site-packages/omniORB/CORBA.pyc' >>> 
+10
source

Source: https://habr.com/ru/post/1401547/


All Articles