File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,7 @@ formats: all
2828# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
2929python :
3030 install :
31- - requirements : docs/requirements.txt
31+ - method : pip
32+ path : .
33+ extra_requirements :
34+ - docs
Original file line number Diff line number Diff line change 1919"""
2020
2121import sys
22+ from importlib .metadata import version as get_version
2223from os .path import abspath , dirname
2324
2425# Make sure we get the version of this copy of cmd2
2728# Import for custom theme from Read the Docs
2829import sphinx_rtd_theme
2930
30- import cmd2
31-
3231# -- General configuration -----------------------------------------------------
3332
3433# If your documentation needs a minimal Sphinx version, state it here.
6665# |version| and |release|, also used in various other places throughout the
6766# built documents.
6867#
69- # version will look like x.y.z
70- version = cmd2 . __version__
71- # release will look like x.y
72- release = '.' .join (version .split ('.' )[:2 ])
68+ # release will look like x.y.z
69+ release : str = get_version ( " cmd2" )
70+ # for example take major/minor
71+ version : str = "." .join (release .split ('.' )[:2 ])
7372
7473# The language for content autogenerated by Sphinx. Refer to documentation
7574# for a list of supported languages.
Original file line number Diff line number Diff line change 11
22pyperclip
33setuptools
4- setuptools-scm < 8
4+ setuptools-scm
55Sphinx
66sphinx-autobuild
77sphinx-rtd-theme
Original file line number Diff line number Diff line change 7777 'ruff' ,
7878 'twine' ,
7979 ],
80+ 'docs' : [
81+ 'setuptools' ,
82+ 'setuptools_scm' ,
83+ 'sphinx' ,
84+ 'sphinx-rtd-theme' ,
85+ 'sphinx-autobuild' ,
86+ ],
8087 'validate' : [
8188 'mypy' ,
8289 'ruff' ,
You can’t perform that action at this time.
0 commit comments