[Scons-dev] doc generation fails with Python3

Bill Deegan bill at baddogconsulting.com
Mon Jan 7 11:02:22 EST 2019


Mats,

I think the issue is that lxml doesn't really work for all doc generation
steps.
I've had issues in the past.
Does libxml2 and libxslt build for python 3?

-Bill


On Mon, Jan 7, 2019 at 10:48 AM Mats Wichmann <mats at wichmann.us> wrote:

>
> Following protocol to get issue on a mailing list before filing a github
> ticket.  I can't see how this is a "users" issue so sending here.
> Strictly speaking this is not even scons itself, but clearly part of the
> scons project.
>
> One doc generation step does not work if Python 3 is used.  From the
> doc/overview.rst instructions:
>
> python bin/docs-update-generated.py
>
> if you invoke that with Python 2.x it goes through the docs collecting
> information, then generates a few files.
>
> if you invoke it with Python 3.x:
>
>
> $ python3 bin/docs-update-generated.py
> Generating entity files...
> error in src/engine/SCons/Subst.xml
> Traceback (most recent call last):
>   File "bin/scons-proc.py", line 351, in <module>
>     h = parse_docs(args, False)
>   File "bin/scons-proc.py", line 76, in parse_docs
>     h.parseContent(content, include_entities)
>   File "/home/mats/Work/scons.doc/bin/SConsDoc.py", line 792, in
> parseContent
>     t.parseContent(content, include_entities)
>   File "/home/mats/Work/scons.doc/bin/SConsDoc.py", line 590, in
> parseContent
>     self.root = etree.fromstring(content)
>   File "src/lxml/etree.pyx", line 3213, in lxml.etree.fromstring
>   File "src/lxml/parser.pxi", line 1872, in lxml.etree._parseMemoryDocument
> ValueError: Unicode strings with encoding declaration are not supported.
> Please use bytes input or XML fragments without declaration.
>
>
>
> scons's "custom xml" has lots of encoding declarations, if in fact
> that's what it is referring to:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> I'm not completely sure that is the complaint.  There are StackOverflow
> articles on this topic from other projects:
>
>
> https://stackoverflow.com/questions/15830421/xml-unicode-strings-with-encoding-declaration-are-not-supported
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20190107/a8448b50/attachment.html>


More information about the Scons-dev mailing list