Envelope task #424: === PythonAPI ===
Investigate alternative Python API generation (for c++11)
|Status:||Archived||Start date:||11 Nov 2015|
|Target version:||Sprint 31|
The current implementation of the Python bindings does not allow us to use many c++11 features, as these cannot be interpreted by gccxml.
One of the alternatives might be pybind11, a lightweight replacement of Boost Python, in combination with a code generator.
#3 Updated by jmfisher over 4 years ago
Created new branch "swig-bindings" off 1.5 release, replacing Py++ by SWIG. Functional tests are at 98% pass, with only 3 tests which fail. I expect to be able to fix the remaining failures within a day or two. I have created many examples of SWIG usage in the sc-intern repository, under technologies/python-bindings/swig directory.
#7 Updated by jmfisher over 4 years ago
cmake script now defaults to Python 2.7, unless BORNAGAIN_USE_PYTHON3 is defined TRUE, in which case it will look for Python 3.5. This works fine under Linux (at least on my machine), but is probably broken on Windows and MacOS without some additional tweaking to the cmake scripts. All of the scripts in the functional tests have been edited to be simultaneously compatible with both Python 2.7 and Python 3.5, using the future module. The swig-bindings branch is now completely independent of boost::python, except for GUI/externals/qt-manhattan-style/module2.cpp
#9 Updated by wuttke over 4 years ago
- Parent task deleted (
When new solution is stable, then please update or replace the wiki page http://apps.jcns.fz-juelich.de/redmine/projects/bornagain/wiki/Python_bindings