Skip to content

Commit d1f036e

Browse files
authored
docs: fetch version correctly (#567)
1 parent 9c73850 commit d1f036e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docs/conf.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
import os
1414
import sys
1515

16-
from importlib.metadata import version
17-
1816
sys.path.insert(0, os.path.abspath('..'))
1917

18+
from schema_salad import _version
2019

2120
# -- Project information -----------------------------------------------------
2221

@@ -59,11 +58,10 @@
5958
# Add any paths that contain custom static files (such as style sheets) here,
6059
# relative to this directory. They are copied after the builtin static files,
6160
# so a file named "default.css" will overwrite the builtin "default.css".
62-
html_static_path = ['_static']
61+
# html_static_path = ['_static']
6362

6463

65-
release = version('schema-salad')
66-
version = '.'.join(release.split('.')[:2])
64+
version = _version.version
6765

6866
autoapi_dirs = ['../schema_salad']
6967
autodoc_typehints = 'description'

docs/requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@
7676
]
7777

7878
extras_require = {
79-
"docs": ["sphinx >= 2.2", "sphinx-rtd-theme", "pytest < 8"],
79+
"docs": [
80+
"sphinx >= 2.2",
81+
"sphinx-rtd-theme",
82+
"pytest < 8",
83+
"sphinx-autoapi",
84+
"sphinx-autodoc-typehints",
85+
"typed_ast;python_version<'3.8'",
86+
"sphinxcontrib-autoprogram",
87+
],
8088
"pycodegen": ["black"],
8189
}
8290

0 commit comments

Comments
 (0)