diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..13c6dc96 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,21 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3" + apt_packages: + - default-jdk + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + +sphinx: + configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py index e677ea47..a1217ed7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,7 +11,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import datetime + +import jnius # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -40,17 +42,20 @@ master_doc = 'index' # General information about the project. -project = u'Pyjnius' -copyright = u'2017, Kivy Team and other contributors' +project = 'pyjnius' + +_today = datetime.datetime.now() + +copyright = f'{_today.year}, Kivy Team and other contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '1.0' +version = jnius.__version__ # The full version, including alpha/beta/rc tags. -release = '1.0a1' +release = jnius.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -91,7 +96,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'furo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/setup.cfg b/setup.cfg index 7df3a159..f6e4fa93 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,3 +6,6 @@ dev = ci = coveralls pytest-rerunfailures +docs = + sphinx + furo