• Murray Cumming's avatar
    Fix the build (and tests) with Python 3 · 6fd32021
    Murray Cumming authored
    * configure.ac: Added some hints in comments.
    * glom/libglom/python_embed/pygdavalue_conversions.cc:
      Do not use PyInt_Check if building with python 3,
      because python 3 does not seem to have integer types.
      Use PyUnicode_Check() instead of PyString_Check().
      This seems to be appropriate for python 2 too.
    * glom/main.cc: Do not call PySys_SetArgv() if building
      with python 3 because we would need to massage the
      arguments into wchar*, and we do not know why we call
      it anyway.
    * glom/python_embed/glom_python.cc: Do not call
      Py_FlushLine() if building with python 3, because it
      does not exist in python 3 and is apparently
    * glom/test_pyembed.cc: USe PyUnicode_Check() instead
      of PyString_Check(). See above.
      Again, do not call Py_FlushLine() with python 3.
    * glom/test_pyembed_singleline.cc: Do not call
      PyFlushLine() with python 3.
    To build for Python 3, you'll need to do something like this:
    export PYTHON=python3.3
      (do this before starting jhbuild, if you are using jhbuild).
    configure --with-boost-python=boost_python-mt-py33
      (or autogen.sh if building from git.)
    You will need to have built pygobject with Python3 support.