Skip to content

Commit

Permalink
fix using library version file instead of setup one (VERSION)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikronic committed Sep 9, 2023
1 parent c3527bb commit c385622
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,6 +45,7 @@
'sphinx.ext.githubpages',
'sphinx.ext.autosectionlabel',
'sphinx_copybutton',
'myst_parser',
]

napoleon_use_ivar = True
Expand All @@ -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'
]

Expand Down

0 comments on commit c385622

Please sign in to comment.