Skip to content

Try to fix ReadTheDocs Sphinx build #1342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ formats: all
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
11 changes: 5 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"""

import sys
from importlib.metadata import version as get_version
from os.path import abspath, dirname

# Make sure we get the version of this copy of cmd2
Expand All @@ -27,8 +28,6 @@
# Import for custom theme from Read the Docs
import sphinx_rtd_theme

import cmd2

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -66,10 +65,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# version will look like x.y.z
version = cmd2.__version__
# release will look like x.y
release = '.'.join(version.split('.')[:2])
# release will look like x.y.z
release: str = get_version("cmd2")
# for example take major/minor
version: str = ".".join(release.split('.')[:2])

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

pyperclip
setuptools
setuptools-scm<8
setuptools-scm
Sphinx
sphinx-autobuild
sphinx-rtd-theme
Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
'ruff',
'twine',
],
'docs': [
'setuptools',
'setuptools_scm',
'sphinx',
'sphinx-rtd-theme',
'sphinx-autobuild',
],
'validate': [
'mypy',
'ruff',
Expand Down
Loading