[Slackbuilds-users] Updates - 20190608.1
Christoph Willing
chris.willing at linux.com
Sun Jun 9 22:15:22 UTC 2019
On 9/6/19 11:05 pm, Alexander Verbovetsky wrote:
> Hello,
>
>> development/docutils: Added python3 support by default.
>
> Can this result in a broken mpv? I got the following:
>
> [ 20/226] Compiling DOCS/man/mpv.rst
> Traceback (most recent call last):
> File "/usr/bin/rst2man.py", line 21, in <module>
> from docutils.core import publish_cmdline, default_description
> File "/usr/lib64/python3.7/site-packages/docutils/__init__.py", line 112, in <module>
> class ApplicationError(StandardError):
> NameError: name 'StandardError' is not defined
>
This is due to a python2 vs python3 issue. Although the setup.py detects
a python3 installation and does its own conversion of its code, it
misses out processing the docutils directory for some reaason. My
initial workaround has been to do a conversion manually i.e. place the line:
2to3 --write --no-diffs docutils
into docutils.SlackBuild AFTER the first 'python setup.py install
--root=$PKG' but BEFORE the following 'python3 setup.py install
--root=$PKG'.
This solution "works for me" (solving the same problem which had been
triggered when building python-netaddr). I haven't suggested it
previously because I did notice some warnings/errors when the processed
code was being compiled.
Another solution is to run 2to3 only on the file mentioned in the error
message i.e.
2to3 --write --no-diffs docutils/__init.py
which also worked for me but made me worry about other unconverted code
in the docutils directory.
chris
More information about the SlackBuilds-users
mailing list