Skip to content

Commit

Permalink
use new metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
glow-mdsol committed Nov 16, 2023
1 parent 57ab2b7 commit a80d80b
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
# 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.

parentdir = os.path.split(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))[0]
sys.path.insert(0,str(parentdir))
import importlib.metadata

import pkg_resources
__version__ = pkg_resources.get_distribution('rwslib').version
_DISTRIBUTION_METADATA = importlib.metadata.metadata('rwslib')

author = _DISTRIBUTION_METADATA['Author']
project = _DISTRIBUTION_METADATA['Name']
version = _DISTRIBUTION_METADATA['Version']
copyright = _DISTRIBUTION_METADATA['Copyright']

from rwslib import __copyright__

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

Expand All @@ -48,17 +50,11 @@
master_doc = 'index'

# General information about the project.
project = u'rwslib'
copyright = __copyright__

# 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 = __version__
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit a80d80b

Please sign in to comment.