sphinx-contrib / fulltoc

Extension for Sphinx to make the sidebar show a full table of contents instead of just the local headings
Apache License 2.0
38 stars 20 forks source link

Can't pip install fulltoc #14

Closed meilon closed 3 years ago

meilon commented 7 years ago

Hi,

I just added sphixcontrib-fulltoc to my documentation build process. While the install worked great on my Windows desktop, it wont install in an alpine docker container

# docker run -it --rm alpine /bin/ash
/ # apk --no-cache add py2-pip python-dev
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/14) Installing libbz2 (1.0.6-r5)
(2/14) Installing expat (2.2.0-r1)
(3/14) Installing libffi (3.2.1-r3)
(4/14) Installing gdbm (1.12-r0)
(5/14) Installing ncurses-terminfo-base (6.0-r8)
(6/14) Installing ncurses-terminfo (6.0-r8)
(7/14) Installing ncurses-libs (6.0-r8)
(8/14) Installing readline (6.3.008-r5)
(9/14) Installing sqlite-libs (3.18.0-r0)
(10/14) Installing python2 (2.7.13-r1)
(11/14) Installing py-setuptools (33.1.1-r1)
(12/14) Installing py2-pip (9.0.1-r1)
(13/14) Installing pkgconf (1.3.7-r0)
(14/14) Installing python2-dev (2.7.13-r1)
Executing busybox-1.26.2-r5.trigger
OK: 70 MiB in 25 packages
/ # pip install sphinx
Collecting sphinx
  Downloading Sphinx-1.6.3-py2.py3-none-any.whl (1.9MB)
    100% |████████████████████████████████| 1.9MB 36kB/s
Collecting snowballstemmer>=1.1 (from sphinx)
  Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB)
    100% |████████████████████████████████| 71kB 4.4MB/s
Collecting alabaster<0.8,>=0.7 (from sphinx)
  Downloading alabaster-0.7.10-py2.py3-none-any.whl
Collecting Jinja2>=2.3 (from sphinx)
  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
    100% |████████████████████████████████| 348kB 2.5MB/s
Collecting imagesize (from sphinx)
  Downloading imagesize-0.7.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from sphinx)
Collecting babel!=2.0,>=1.3 (from sphinx)
  Downloading Babel-2.5.0-py2.py3-none-any.whl (6.8MB)
    100% |████████████████████████████████| 6.8MB 128kB/s
Collecting Pygments>=2.0 (from sphinx)
  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
    100% |████████████████████████████████| 849kB 726kB/s
Collecting docutils>=0.11 (from sphinx)
  Downloading docutils-0.14-py2-none-any.whl (543kB)
    100% |████████████████████████████████| 552kB 1.7MB/s
Collecting requests>=2.0.0 (from sphinx)
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 4.3MB/s
Collecting six>=1.5 (from sphinx)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting typing; python_version < "3.5" (from sphinx)
  Downloading typing-3.6.2-py2-none-any.whl
Collecting sphinxcontrib-websupport (from sphinx)
  Downloading sphinxcontrib_websupport-1.0.1-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.3->sphinx)
  Downloading MarkupSafe-1.0.tar.gz
Collecting pytz>=0a (from babel!=2.0,>=1.3->sphinx)
  Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 2.0MB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0.0->sphinx)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 2.5MB/s
Collecting certifi>=2017.4.17 (from requests>=2.0.0->sphinx)
  Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB)
    100% |████████████████████████████████| 358kB 1.5MB/s
Collecting urllib3<1.23,>=1.21.1 (from requests>=2.0.0->sphinx)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 3.1MB/s
Collecting idna<2.7,>=2.5 (from requests>=2.0.0->sphinx)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 5.2MB/s
Installing collected packages: snowballstemmer, alabaster, MarkupSafe, Jinja2, imagesize, pytz, babel, Pygments, docutils, chardet, certifi, urllib3, idna, requests, six, typing, sphinxcontrib-websupport, sphinx
  Running setup.py install for MarkupSafe ... done
Successfully installed Jinja2-2.9.6 MarkupSafe-1.0 Pygments-2.2.0 alabaster-0.7.10 babel-2.5.0 certifi-2017.7.27.1 chardet-3.0.4 docutils-0.14 idna-2.6 imagesize-0.7.1 pytz-2017.2 requests-2.18.4 six-1.10.0 snowballstemmer-1.2.1 sphinx-1.6.3 sphinxcontrib-websupport-1.0.1 typing-3.6.2 urllib3-1.22
/ # pip install sphinxcontrib-fulltoc
Collecting sphinxcontrib-fulltoc
  Downloading sphinxcontrib-fulltoc-1.2.0.tar.gz
    Complete output from command python setup.py egg_info:

    Installed /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg
    ERROR:root:Error parsing
    Traceback (most recent call last):
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/core.py", line 111, in pbr
        attrs = util.cfg_to_args(path, dist.script_args)
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/util.py", line 267, in cfg_to_args
        wrap_commands(kwargs)
      File "/tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/.eggs/pbr-3.1.1-py2.7.egg/pbr/util.py", line 569, in wrap_commands
        cmdclass = ep.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2297, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/sphinx/setup_command.py", line 23, in <module>
        from sphinx.application import Sphinx
      File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 33, in <module>
        from sphinx.environment import BuildEnvironment
      File "/usr/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 45, in <module>
        from sphinx.util.websupport import is_commentable
      File "/usr/lib/python2.7/site-packages/sphinx/util/websupport.py", line 11, in <module>
        from sphinxcontrib.websupport.utils import is_commentable  # NOQA
      File "/usr/lib/python2.7/site-packages/sphinxcontrib/websupport/__init__.py", line 15, in <module>
        from sphinxcontrib.websupport.core import WebSupport  # NOQA
      File "/usr/lib/python2.7/site-packages/sphinxcontrib/websupport/core.py", line 17, in <module>
        from jinja2 import Environment, FileSystemLoader
      File "/usr/lib/python2.7/site-packages/jinja2/__init__.py", line 33, in <module>
        from jinja2.environment import Environment, Template
      File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 15, in <module>
        from jinja2 import nodes
      File "/usr/lib/python2.7/site-packages/jinja2/nodes.py", line 19, in <module>
        from jinja2.utils import Markup
      File "/usr/lib/python2.7/site-packages/jinja2/utils.py", line 486, in <module>
        MutableMapping.register(LRUCache)
      File "/usr/lib/python2.7/abc.py", line 109, in register
        if issubclass(subclass, cls):
      File "/usr/lib/python2.7/abc.py", line 180, in __subclasscheck__
        if issubclass(subclass, scls):
      File "/usr/lib/python2.7/site-packages/typing.py", line 1265, in __subclasscheck__
        return super(GenericMeta, self).__subclasscheck__(cls)
    TypeError: super() argument 1 must be type, not None
    error in setup command: Error parsing /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/setup.cfg: TypeError: super() argument 1 must be type, not None

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YhGhnD/sphinxcontrib-fulltoc/

Why won't it install?

herisanu commented 7 years ago

Same here.

ulope commented 7 years ago

Same here in a Python 2.7 virtualenv on macOS. Not even version 1.1 is installable

Sumo-MBryant commented 7 years ago

I get the following error:

  Collecting sphinxcontrib-fulltoc==1.2.0 (from -r requirements.txt (line 5))
    Using cached sphinxcontrib-fulltoc-1.2.0.tar.gz
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "C:\Program Files\Python36\lib\site-packages\setuptools\__init__.py", line 10, in <module>
          from setuptools.extern.six.moves import filter, filterfalse, map
        File "C:\Program Files\Python36\lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
          from pkg_resources.extern import VendorImporter
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3017, in <module>
          @_call_aside
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
          f(*args, **kwargs)
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 3045, in _initialize_master_working_set
          dist.activate(replace=False)
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2577, in activate
          declare_namespace(pkg)
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2151, in declare_namespace
          _handle_ns(packageName, path_item)
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
          _rebuild_mod_path(path, packageName, module)
        File "C:\Program Files\Python36\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
          orig_path.sort(key=position_in_sys_path)
      AttributeError: '_NamespacePath' object has no attribute 'sort'

      ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in C:\Users\xxx\AppData\Local\Temp\pip-build-12w2_kx2\sphinxcontrib-fulltoc\
meilon commented 7 years ago

I found a workaround: If you pip install pbr before you pip install sphinxcontrib-fulltoc, the latter actually installs and works fine

dgronskij commented 6 years ago

thanks @meilon !

royrusso commented 5 years ago

This fails with vanilla python 3.6. Installing pbr beforehand, didn't seem to help. Same stack trace.

electrofelix commented 3 years ago

I'm not seeing this with python 3.8, pbr has moved on a lot so unlikely to hit the original cause these days which was due to a broken pbr 3.1.1. There maybe other broken versions, so if it occurs again please report.