Announcement

Collapse
No announcement yet.

CentOS 8 Python bindings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CentOS 8 Python bindings

    Hi

    I have installed Subversion 1.10.6 and python bindings (subversion-python) to CentOS 8 server from opensource.wandisco.com repo. My goal is to get Trac and Subversion working with CentOS 8.

    After installation I encountered two problems with python bindings:

    1. If I run ----> ’python2 -c "from svn import core"’
    * then ’ImportError: No module named _core’ raises

    2. If I specify PYTHONHOME and PYTHONPATH ----> ’PYTHONHOME=/usr PYTHONPATH=/usr/lib64/python2.7/site-packages/libsvn/ python2 -c "from svn import core"’
    * then ’ImportError: /usr/lib64/libsvn_swig_py-1.so.0: undefined symbol: PyUnicode_FromFormat’ raises
    ** It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of ’PyUnicode_FromFormat’

    Is it possible to get CentOS 8 python bindings package with UCS4 support?

    BR,

    Jarkko Hyvärinen

    CentOS Linux release 8.1.1911
    Python 2.7.16
    svn, version 1.10.6 (r1863367), compiled Jan 16 2020, 12:37:21 on x86_64-redhat-linux-gnu
    Last edited by jarkko_hyvarinen; 04-13-2020, 10:02 AM.

  • #2
    The WANdisco Subversion binaries for CentOS 8 are explicitly compiled with Python 3.0 bindings.

    Trying to use them with Python 2.7 will fail as you've seen.

    Comment


    • #3
      Actually they are compiled with python3.6 and installed into /usr/lib64/python2.7/site-packages, which seems to be a bug.

      $ rpm -qlp subversion-python-1.9.12-1.x86_64.rpm | grep py
      /usr/lib64/libsvn_swig_py-1.so
      /usr/lib64/libsvn_swig_py-1.so.0
      /usr/lib64/libsvn_swig_py-1.so.0.0.0
      /usr/lib64/python2.7/site-packages/libsvn
      /usr/lib64/python2.7/site-packages/libsvn/__init__.py
      /usr/lib64/python2.7/site-packages/libsvn/__pycache__
      /usr/lib64/python2.7/site-packages/libsvn/__pycache__/__init__.cpython-36.pyc
      /usr/lib64/python2.7/site-packages/libsvn/__pycache__/client.cpython-36.pyc
      /usr/lib64/python2.7/site-packages/libsvn/__pycache__/core.cpython-36.pyc
      ...

      Recompiling the source RPM on my CentOS 8 solved the issue for me:

      $ rpm -qlp subversion-python-1.9.12-1.x86_64.rpm | grep py
      /usr/lib64/libsvn_swig_py-1.so
      /usr/lib64/libsvn_swig_py-1.so.0
      /usr/lib64/libsvn_swig_py-1.so.0.0.0
      /usr/lib64/python2.7/site-packages/libsvn
      /usr/lib64/python2.7/site-packages/libsvn/__init__.py
      /usr/lib64/python2.7/site-packages/libsvn/__init__.pyc
      /usr/lib64/python2.7/site-packages/libsvn/__init__.pyo
      ...
      Last edited by visit1985; 06-16-2020, 03:51 PM.

      Comment


      • #4
        Thank you for your report! On it.

        Comment


        • #5
          Note above: You've listed out the 1.9.12 bits not the 1.10.6 bits. Please try the 1.10.6 bits.

          Comment


          • #6
            Yes, I was using the 1.9 repo in my case. But the 1.10.6 bits have the same issue:

            $ rpm -qlp subversion-python-1.10.6-1.x86_64.rpm | grep py
            /usr/lib64/libsvn_swig_py-1.so
            /usr/lib64/libsvn_swig_py-1.so.0
            /usr/lib64/libsvn_swig_py-1.so.0.0.0
            /usr/lib64/python2.7/site-packages/libsvn
            /usr/lib64/python2.7/site-packages/libsvn/__init__.py
            /usr/lib64/python2.7/site-packages/libsvn/__pycache__
            /usr/lib64/python2.7/site-packages/libsvn/__pycache__/__init__.cpython-36.pyc
            /usr/lib64/python2.7/site-packages/libsvn/__pycache__/client.cpython-36.pyc
            /usr/lib64/python2.7/site-packages/libsvn/__pycache__/core.cpython-36.pyc
            ...

            Comment


            • #7
              Thank you - we'll get this fixed. Cheers.

              Comment

              Working...
              X