[Python-modules-team] Bug#916168: python3-sphinx-autorun: pycon calls "python" - not "python3"

cholm cholm at nbi.dk
Mon Dec 10 20:06:08 GMT 2018


Package: python3-sphinx-autorun
Version: 1.1.0-2
Severity: grave
Justification: renders package unusable

Dear Maintainer,

The extension called as

.. runblock pycon:

     <code>

always executes <code> with the interpreter "python" rather than the 
expect
"python3" for this build (python3-sphinx-autorun) of the package.

The problem is in line 28 of

   /usr/lib/python3/dist-packages/sphinx_autorun/__init__.py

where the code reads

       config = dict(
           pycon='python ' + pycon,
           ...

where it _should_ be

       config = dict(
           pycon='python3 ' + pycon,
           ...

Exactly how to fix this, is not clear to me.

There is a workaround by defining the autorun languages in the conf.py 
file

   import sphinx_autorun
   import inspect

   pycon = inspect.getfile(sphinx_autorun).replace("__init__","pycon")
   autorun_languages = dict(pycon='python3 ' + pycon,
                            pycon_prefix_chars=4,
                            pycon_show_source=False,
                            console='bash',
                            console_prefix_chars=1)

but it's a bit of a hack I think.

-- System Information:
Debian Release: buster/sid
   APT prefers unstable
   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-sphinx-autorun depends on:
ii  python3         3.7.1-2
ii  python3-sphinx  1.7.9-1

python3-sphinx-autorun recommends no packages.

python3-sphinx-autorun suggests no packages.

-- no debconf information


-- 
Christian Holm Christensen 
-------------------------------------------------
  Niels Bohr Institute, Blegdamsvej 17, DK-2100 Copenhagen
  http://cern.ch/cholm, +4524618591



More information about the Python-modules-team mailing list