From c385622b85413524742e7314ae2746c4421152c8 Mon Sep 17 00:00:00 2001 From: Nikronic Date: Sat, 9 Sep 2023 16:39:42 +0330 Subject: [PATCH] fix using library version file instead of setup one (`VERSION`) --- docs/source/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 1d321d3..b706de5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -19,10 +19,10 @@ author = 'Nikan Doosti' # The full version, including alpha/beta/rc tags -VERSION: dict = {} -with open('../../niklib/version.py', 'r') as version_file: - exec(version_file.read(), VERSION) -release = VERSION['VERSION'] +version_file_path = '../../VERSION' +with open(version_file_path, 'r') as version_file: + package_version = version_file.read().strip() +release = package_version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -45,6 +45,7 @@ 'sphinx.ext.githubpages', 'sphinx.ext.autosectionlabel', 'sphinx_copybutton', + 'myst_parser', ] napoleon_use_ivar = True @@ -59,7 +60,6 @@ # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [ - 'niklib.version', '_build' ]