Skip to content
Snippets Groups Projects
  • Studer Gabriel's avatar
    e5766c73
    initial python3 port commit · e5766c73
    Studer Gabriel authored
    - 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 versions 3.6/3.7/3.8 to cmake_support/FindPython.cmake
    - Prefer versioned Boost Python 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 <QMEAN_DIR>
    - resolve pickle encoding issue
      The linear local/global scorers are simply pickled to disk which can
      cause problems between Python 2 and 3. To avoid changing the code
      I simply loaded the scorer objects by explicitely defining the encoding
      and dumped them again => scorer = pickle.load(f_stream, encoding="latin1")
      The unit tests assure that the scorers still produce the same results.
    e5766c73
    History
    initial python3 port commit
    Studer Gabriel authored
    - 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 versions 3.6/3.7/3.8 to cmake_support/FindPython.cmake
    - Prefer versioned Boost Python 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 <QMEAN_DIR>
    - resolve pickle encoding issue
      The linear local/global scorers are simply pickled to disk which can
      cause problems between Python 2 and 3. To avoid changing the code
      I simply loaded the scorer objects by explicitely defining the encoding
      and dumped them again => scorer = pickle.load(f_stream, encoding="latin1")
      The unit tests assure that the scorers still produce the same results.