# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.

import os
import sys

# print("Unaltered path:", sys.path)
# sys.path.insert(0, os.path.abspath('.'))
# print("Path w/ .abspath('.'):", sys.path)
# sys.path.insert(0, os.path.abspath('..'))
# print("Path w/ .abspath('..'):", sys.path)
# sys.path.insert(0, os.path.abspath('../src'))
# print("Path w/ .abspath('..src'):", sys.path)
sys.path.insert(0, os.path.abspath('../src/cltkv1'))
print("Path w/ .abspath('..src/cltkv1'):", sys.path)


# -- Project information -----------------------------------------------------

project = "The Classical Language Toolkit"
copyright = '2019, "Kyle P. Johnson <kyle@kyle-p-johnson.com>"'
author = '"Kyle P. Johnson <kyle@kyle-p-johnson.com>"'

# The full version, including alpha/beta/rc tags
# TODO: Figure out if it is possible to read this from ``pyproject.toml``
# release = "1.0.0a1"


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

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
#
# TODO: Decide which of these are necessary
#
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.doctest",
    "sphinx.ext.napoleon",
    "sphinx_autodoc_typehints",  # Must come *after* sphinx.ext.napoleon.
    "sphinx.ext.autosummary",
    "sphinx.ext.coverage",
    "sphinx.ext.extlinks",
    "sphinx.ext.ifconfig",
    "sphinx.ext.todo",
    "sphinx.ext.viewcode",
]


# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML op_output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"]

@@ -549,338 +549,80 @@
 e.%0A%0A
-import os%0Aimport sys%0A%0A# print(%22Unaltered path:%22, sys.path)%0A# sys.path.insert(0, os.path.abspath('.'))%0A# print(%22Path w/ .abspath('.'):%22, sys.path)%0A# sys.path.insert(0, os.path.abspath('..'))%0A# print(%22Path w/ .abspath('..'):%22, sys.path)%0A# sys.path.insert(0, os.path.abspath('../src'))%0A# print(%22Path w/ .abspath('..src'):%22, sys.path)
+from datetime import datetime%0Aimport pkg_resources%0Aimport os%0Aimport sys%0A
 %0Asys
@@ -653,17 +653,17 @@
 abspath(
-'
+%22
 ../src/c
@@ -671,63 +671,10 @@
 tkv1
-'))%0Aprint(%22Path w/ .abspath('..src/cltkv1'):%22, sys.path
+%22)
 )%0A%0A%0A
@@ -796,16 +796,64 @@
 oolkit%22%0A
+today = datetime.today()%0Acurr_year = today.year%0A
 copyrigh
@@ -860,13 +860,26 @@
 t = 
+f
 '2019
+-%7Bcurr_year%7D
 , %22K
@@ -976,17 +976,16 @@
 .com%3E%22'%0A
-%0A
 # The fu
@@ -1029,103 +1029,94 @@
 ags%0A
-# TODO: Figure out if it is possible to read this from %60%60pyproject.toml%60%60%0A# release = %221.0.0a1%22
+curr_version = pkg_resources.get_distribution(%22cltkv1%22)%0Arelease = curr_version.version
 %0A%0A%0A#
@@ -1387,16 +1387,34 @@
 ecessary
+, if others needed
 %0A#%0Aexten

add dynamic reads of year and version to sphinx config