summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
feef084)
Since the manpage indices generated without lxml would be missing some
parts, it doesn't make sense to keep lxml optional anymore.
gperf
gtkdocize (optional)
python (optional)
gperf
gtkdocize (optional)
python (optional)
+ python-lxml (optional, but required to build the indices)
- python-lxml (entirely optional)
When systemd-hostnamed is used, it is strongly recommended to
install nss-myhostname to ensure that, in a world of
When systemd-hostnamed is used, it is strongly recommended to
install nss-myhostname to ensure that, in a world of
AC_ARG_WITH([python],
[AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
AC_ARG_WITH([python],
[AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
AS_IF([test "x$with_python" != "xno"], [
AM_PATH_PYTHON(,, [:])
AS_IF([test "x$with_python" != "xno"], [
AM_PATH_PYTHON(,, [:])
- AS_IF([test "$PYTHON" != :], [have_python=yes])
+ AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes], [have_lxml=no])
+ AS_IF([test "$PYTHON" != : -a $have_lxml = yes], [have_python=yes])
])
AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
AS_IF([test "x$PYTHON_BINARY" = "x"],
])
AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
AS_IF([test "x$PYTHON_BINARY" = "x"],
if 'custom-entities.ent' in url:
return self.resolve_filename('man/custom-entities.ent', context)
if 'custom-entities.ent' in url:
return self.resolve_filename('man/custom-entities.ent', context)
-try:
- _parser = tree.XMLParser()
- _parser.resolvers.add(CustomResolver())
- def xml_parse(page):
- doc = tree.parse(page, _parser)
- doc.xinclude()
- return doc
- def xml_print(xml):
- return tree.tostring(xml, pretty_print=True, encoding='utf-8')
-
-except ImportError:
- import xml.etree.ElementTree as tree
- import re as _re
- import io as _io
-
- def xml_parse(page):
- s = _re.sub(b'&[a-zA-Z0-9_]+;', b'', open(page, 'rb').read())
- return tree.parse(_io.BytesIO(s))
- xml_print = lambda xml: tree.tostring(xml, encoding='utf-8')
+_parser = tree.XMLParser()
+_parser.resolvers.add(CustomResolver())
+def xml_parse(page):
+ doc = tree.parse(page, _parser)
+ doc.xinclude()
+ return doc
+def xml_print(xml):
+ return tree.tostring(xml, pretty_print=True, encoding='utf-8')