Skip to content

Commit c0d2ea0

Browse files
doc: fix docs
1 parent f63f42a commit c0d2ea0

2 files changed

Lines changed: 12 additions & 39 deletions

File tree

docs/source/conf.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424

2525
# The full version, including alpha/beta/rc tags
2626
# release = '0.1.0'
27-
from pkg_resources import get_distribution, DistributionNotFound
27+
# NB: alias the import — a bare `version` in this module's namespace would be
28+
# picked up by Sphinx as the `version` config value (a function), crashing the
29+
# inventory dump.
30+
from importlib.metadata import version as _get_version, PackageNotFoundError
2831
try:
29-
release = get_distribution('kw6').version
30-
except DistributionNotFound:
32+
release = _get_version('kw6')
33+
except PackageNotFoundError:
3134
pass
3235

3336

@@ -39,7 +42,6 @@
3942
extensions = [
4043
'sphinx.ext.autodoc',
4144
'sphinx.ext.autosummary',
42-
'recommonmark',
4345
'sphinx.ext.viewcode',
4446
'sphinx_rtd_theme',
4547
]

docs/source/requirements.txt

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,6 @@
1-
alabaster==0.7.12
2-
Babel==2.8.0
3-
certifi==2020.6.20
4-
chardet==3.0.4
5-
commonmark==0.9.1
6-
docutils==0.16
7-
flake8==3.8.3
8-
idna==2.10
9-
imagesize==1.2.0
10-
Jinja2==2.11.2
11-
MarkupSafe==1.1.1
12-
mccabe==0.6.1
13-
numpy==1.19.2
14-
packaging==20.4
15-
Pillow==7.2.0
16-
pycodestyle==2.6.0
17-
pydantic==1.6.1
18-
pyflakes==2.2.0
19-
Pygments==2.7.1
20-
pyparsing==2.4.7
21-
pytz==2020.1
22-
recommonmark==0.6.0
23-
requests==2.24.0
24-
six==1.15.0
25-
snowballstemmer==2.0.0
26-
Sphinx==3.2.1
27-
sphinx-rtd-theme==0.5.0
28-
sphinxcontrib-applehelp==1.0.2
29-
sphinxcontrib-devhelp==1.0.2
30-
sphinxcontrib-htmlhelp==1.0.3
31-
sphinxcontrib-jsmath==1.0.1
32-
sphinxcontrib-qthelp==1.0.3
33-
sphinxcontrib-serializinghtml==1.1.4
34-
tqdm==4.54.1
35-
urllib3==1.25.10
1+
# Install the package itself so autodoc can import kw6 and its dependencies
2+
# (numpy, Pillow, pydantic) resolve to current wheels on the docs Python.
3+
.
4+
5+
sphinx>=7,<9
6+
sphinx-rtd-theme>=2

0 commit comments

Comments
 (0)