Re: Re: CentOS 8 Python bindings - opensource.wandisco.com

2020-04-12 Thread Yasuhito FUTATSUKI
Hi,

On 2020/04/13 4:04, Mark Phippard wrote:
> On Sun, Apr 12, 2020 at 1:10 PM Nico Kadel-Garcia  wrote:
> 
>> On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
>>  wrote:
>>>
>>> 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 encoutered two problems with python bindings:
>>>
>>>
>>>
>>> If I run > ’python2 -c "from svn import core"’
>>>
>>> then ’ImportError: No module named _core’ raises
>>>
>>> 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
>>>
>>>i.
>> It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of
>> ’PyUnicode_FromFormat’

If libsvn_swig_py-1.so.0 requires symbol PyUnicode_FromFormat, it is built
without Py_USING_UNICODE in pyconfig.h, for Python 2.7. On the other hand,
if Python library has PyUnicodeUCS4_FromFormat, it is built with
Py_UNSING_UNICODE defined and Py_UNICODE_SIZE >= 4.

That is to say, that Python bindings modules are broken.

>>>
>>> Is there currently any workaround to this without building Subversion
>> from source cod

I think there are no workaround without building Python bindings from
source code, except to contact with the packager of that package.

>>
>> Use python 3.
>>
>>
> The bindings do not support Python 3, so that is not an option.  The
> upcoming Subversion 1.14 LTS release will add support for Python 3 but
> until then once has no choice but use Python 2 if they are using the
> bindings.

Even if we use Subversion 1.14 LTS, we can't use Python 3 bindings
without modifying existing application programs, mainly str/bytes
distinction.

> 
> Aside from that ... unfortunately I have no help to offer on the original
> problem.
> 

Cheers,
-- 
Yasuhito FUTATSUKI 


Re: CentOS 8 Python bindings - opensource.wandisco.com

2020-04-12 Thread Mark Phippard
On Sun, Apr 12, 2020 at 1:10 PM Nico Kadel-Garcia  wrote:

> On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
>  wrote:
> >
> > 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 encoutered two problems with python bindings:
> >
> >
> >
> > If I run > ’python2 -c "from svn import core"’
> >
> > then ’ImportError: No module named _core’ raises
> >
> > 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
> >
> >i.
> It seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of
> ’PyUnicode_FromFormat’
> >
> >
> >
> > Is there currently any workaround to this without building Subversion
> from source cod
>
> Use python 3.
>
>
The bindings do not support Python 3, so that is not an option.  The
upcoming Subversion 1.14 LTS release will add support for Python 3 but
until then once has no choice but use Python 2 if they are using the
bindings.

Aside from that ... unfortunately I have no help to offer on the original
problem.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/


Re: CentOS 8 Python bindings - opensource.wandisco.com

2020-04-12 Thread Nico Kadel-Garcia
On Sat, Apr 11, 2020 at 3:21 PM Jarkko Hyvärinen
 wrote:
>
> 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 encoutered two problems with python bindings:
>
>
>
> If I run > ’python2 -c "from svn import core"’
>
> then ’ImportError: No module named _core’ raises
>
> 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
>
>i.  It 
> seems that our CentOS 8 server has ’PyUnicodeUCS4_FromFormat’ instead of 
> ’PyUnicode_FromFormat’
>
>
>
> Is there currently any workaround to this without building Subversion from 
> source cod

Use python 3. Python 2 was partially, and poorly, abandoned for RHEL
8 and it's being phased out of RHEL 7 painfully and slowly. Take  good
look at the Fedora SRPM's if you wnt to backport to RHEL 8. It's
tricky business. I used to publish the rpmforge RPMs for Subversion,
and backporting got *paindul* due to various library dependencies
which notably exceeded those of the OS.