Skip to content
Snippets Groups Projects
Unverified Commit 47d6e8bd authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #86 from andreadelprete/master

Add compatibility with python 3
parents d5f10f61 7116c02e
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ IF(NOT CLIENT_ONLY)
SET(BOOST_COMPONENTS system thread regex)
SEARCH_FOR_BOOST ()
FINDPYTHON(2.7 EXACT)
FINDPYTHON()
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(USE_QT4)
......
......@@ -18,6 +18,7 @@
* [Installation procedure](#installation-procedure)
* [Dependencies](#dependencies)
* [PythonQt](#pythonqt)
* [Python 3](#python-3)
* [Troubleshooting](#troubleshooting)
## gepetto-viewer-corba
......@@ -203,6 +204,34 @@ To install `gepetto-gui` you just have to follow the installation step at the to
### PythonQt
gepetto-gui offers the possibility to develop plugins in python. To do so, you must install PythonQt by following the instructions here: https://github.com/jmirabel/PythonQt#readme
### Python 3
This section describes the procedure to get bindings for Python 3.
The support for Python 3 is from `OmniORB 4.2.2`.
In Ubuntu 16.04, the version is 4.2.1, and in Ubuntu 18.04 it is 4.2.2, but Ubuntu main repos do not provide python 3 support.
Thus, to make it work you must manually compile `OmniORB 4.2.2`.
Download latest versions of `OmniORB` and `OmniORBpy` from [sourceforge](https://sourceforge.net/projects/omniorb/).
Then compile `OmniORB` making sure it finds python3:
```bash
export PYTHON=/usr/bin/python3
cd omniORB-4.2.2/
mkdir build
cd build
../configure --prefix=${CMAKE_INSTALL_PREFIX}
make
make install
```
Compile `OmniORBpy` making sure it finds python3:
```bash
cd omniORBpy-4.2.2/
mkdir build
cd build
../configure --prefix=${CMAKE_INSTALL_PREFIX}
make
make install
```
Finally you can compile and install `gepetto-viewer-corba` making sure it finds `OmniORB 4.2.2`.
# Troubleshooting
## `CORBA::TRANSIENT` when launching a server
......
......@@ -20,9 +20,6 @@ SET(IDL_SOURCES
graphical-interface
)
# search for python
FINDPYTHON(2.7 EXACT REQUIRED)
OMNIIDL_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/idl)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
......
......@@ -15,5 +15,5 @@
# hpp-corbaserver. If not, see
# <http://www.gnu.org/licenses/>.
from color import Color
from quaternion import Quaternion
from gepetto.color import Color
from gepetto.quaternion import Quaternion
import omniORB
omniORB.updateModule("gepetto.corbaserver")
import graphical_interface_idl
import gepetto.corbaserver.graphical_interface_idl
from client import Client
from gepetto.corbaserver.client import Client
......@@ -32,7 +32,7 @@ class Client:
try:
obj = self.rootContext.resolve (name)
except CosNaming.NamingContext.NotFound, ex:
except CosNaming.NamingContext.NotFound:
raise CorbaError (
'failed to find the service ``{0}\'\''.format (serviceName [0]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment