Skip to content

Commit

Permalink
get __version__ from importlib.metadata and __version_info__ from pac…
Browse files Browse the repository at this point in the history
…kaging.version
  • Loading branch information
jagerber48 committed Jul 21, 2024
1 parent 4a470e4 commit f8cbef5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions uncertainties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,16 @@
This software is released under the BSD license.
"""

import importlib.metadata
import packaging.version


from .core import * # noqa
from .core import __all__ # noqa For a correct help(uncertainties)

from .version import __version__, __version_tuple__ # noqa

# for backward compatibility
__version_info__ = __version_tuple__
__version__ = importlib.metadata.version('uncertainties')
__version_info__ = packaging.version.Version(__version__).release


__author__ = "Eric O. LEBIGOT (EOL) <eric.lebigot@normalesup.org>"

0 comments on commit f8cbef5

Please sign in to comment.