Opened 6 years ago

Closed 6 years ago

#10048 closed defect (fixed)

Add details for building pyxml with python2 as well as python3

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone: 8.2
Component: BOOK Version: SVN
Severity: normal Keywords:


The book now defaults to using python3 to build the pyxml module of libxml. This matches well with all the gnome packages that use its-tool. But there are use-cases for building the module with python2:

  1. libxslt will provide a module in this case, although nothing in the book needs it.
  1. There is/are package(s) in the book which require the python2 version of the module. So far, only gimp-help has been identified.

Change History (5)

comment:1 by ken@…, 6 years ago

I've taken a look at all the tarballs I have locally. After discounting old wxPython (not in the book, and now replaced by wxWidgets in my scripts) the only possible additional users that I can see are docbook-xsl (i.e. it installs some Python whether or not the modules are present), libxml2's python (it will invoke libxslt if that has already been loaded), and possibly Scons.

The lxml module showed up as a possible user, but I think it is actually shipping its own copy of libxml.

For Scons, I suspect that this might be a scons-2 matter (we're now on scons-3). I had /usr/lib/python2.7/site-packages/SCons/*.py on past builds (note the capitals), for the moment I don't have that. I'm going to rebuild libxslt, then retry scons-3.

Then I'll look at fixing up what I've found.

comment:2 by ken@…, 6 years ago

Found it in scons - current location is /usr/lib/scons-3.0.0/SCons/Tool/docbook/ : that will use libxml2 and libxslt if both exist, or else fall back to lxml if that exists. Can be edited to prefer libxslt.

Probably nothing in the book will need it, but libxslt built with python2 libxml2 is an optional dependency for scons when processing docbook files. See e.g.

comment:3 by ken@…, 6 years ago

In fact, for scons the existence of python2 libxml2, libxslt OR lxml is a RUNTIME dependency, the installed files reference them whether or not they exist at build-time.

comment:4 by ken@…, 6 years ago

Status: newassigned

comment:5 by ken@…, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.