You are not logged in.

#1 2013-04-03 14:06:47

jono
Member
Registered: 2012-01-03
Posts: 13

libxml2 and python3

Hi All,

I am developing on a project (gedit) that requires libxml2 in Python 3.

I have noticed that in arch 'extra/' there is libxml2 only for Python 2. For Python 3 it only gives lxml.

I presume there is a reason why libxml2 is not there for Python 3. Is there a way to rig it up so I can get this dependency to work for this project?

Offline

#2 2013-04-04 19:11:30

kachelaqa
Member
Registered: 2010-09-26
Posts: 215

Re: libxml2 and python3

libxml2 is a C library, not a Python library. It provides bindings for various other languages, including Python. However, it currently only supports Python 2.

lxml is a separate Python XML library that is built on libxml2 and libxslt. It supports both Python 2 and Python 3.

Are you absolutely sure that your gedit project "requires libxml2 in Python 3" (whatever that means)? Why can't you use Python 2, or lxml?

Offline

#3 2013-04-04 20:11:54

jono
Member
Registered: 2012-01-03
Posts: 13

Re: libxml2 and python3

Ah. You are right. I needed to change it such that the script (itstool) uses Python2 instead of Python3. Looks like someone already submitted a patch for that:
https://bugs.freedesktop.org/show_bug.cgi?id=58223

Still a little confusing since the changelog mentions Python3 though.

Offline

Board footer

Powered by FluxBB