-
- Downloads
Initial Python 3 port commit
This commit doesn't make OpenStructure work with Python 3. The goal of this commit was to perform an automated port of the Python code and make it compile. The performed steps: - Edited CMakeLists.txt to search for Python with 3.6 as min version 3.6 is the Python version shipped by default with Ubuntu 18.04 LTS - Add version 3.6 to cmake_support/FindPython.cmake - Adapt setup_boost macro in cmake_support/OST.cmake to prefer versioned libraries and not first check for boost_python.so. In the example of Ubuntu 18.04, libboost_python.so is specific for Python 2 but libboost_python3.so is the one we want. - apply the following command: 2to3-2.7 -n -w <OST_DIR> - adapt base/pymod/wrap_base.cc, gui/pymod/wrap_gui.cc and gui/pymod/export_message_widget.cc as PyString functionalities do not exist anymore in the Python 3 interpreter (replaced by PyUnicode) - adapt gui/src/python_shell/python_interpreter_worker.hh to resolve issue discussed in https://stackoverflow.com/questions/23068700/embedding-python3-in-qt-5 Long story short: Qt does a typedef for "slots" which causes trouble with other headers that are pulled in from the Python interpreter
Showing
- CMakeLists.txt 1 addition, 1 deletionCMakeLists.txt
- cmake_support/FindPython.cmake 1 addition, 1 deletioncmake_support/FindPython.cmake
- cmake_support/OST.cmake 4 additions, 4 deletionscmake_support/OST.cmake
- deployment/macos/deps.py 23 additions, 23 deletionsdeployment/macos/deps.py
- deployment/macos/pack.py 18 additions, 18 deletionsdeployment/macos/pack.py
- doc/conf/conf.py 4 additions, 4 deletionsdoc/conf/conf.py
- doc/make.py 2 additions, 2 deletionsdoc/make.py
- doc/to_sphinx.py 6 additions, 6 deletionsdoc/to_sphinx.py
- docker/test_docker.py 1 addition, 1 deletiondocker/test_docker.py
- examples/demos/charmm_trj_blur.py 1 addition, 1 deletionexamples/demos/charmm_trj_blur.py
- examples/demos/correlate.py 1 addition, 1 deletionexamples/demos/correlate.py
- examples/demos/gfx_mapslab.py 2 additions, 2 deletionsexamples/demos/gfx_mapslab.py
- examples/demos/load_and_display.py 1 addition, 1 deletionexamples/demos/load_and_display.py
- examples/demos/the_hammer.py 1 addition, 1 deletionexamples/demos/the_hammer.py
- modules/base/pymod/table.py 18 additions, 18 deletionsmodules/base/pymod/table.py
- modules/base/pymod/testutils.py 4 additions, 4 deletionsmodules/base/pymod/testutils.py
- modules/base/pymod/wrap_base.cc 9 additions, 3 deletionsmodules/base/pymod/wrap_base.cc
- modules/base/pymod/xmlrunner.py 2 additions, 2 deletionsmodules/base/pymod/xmlrunner.py
- modules/base/tests/test_table.py 146 additions, 146 deletionsmodules/base/tests/test_table.py
- modules/bindings/pymod/align_3dcomb.py 4 additions, 4 deletionsmodules/bindings/pymod/align_3dcomb.py
Loading
Please register or sign in to comment