summaryrefslogtreecommitdiffstats
path: root/src/ansiblelint/version.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ansiblelint/version.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ansiblelint/version.py b/src/ansiblelint/version.py
new file mode 100644
index 0000000..4967ced
--- /dev/null
+++ b/src/ansiblelint/version.py
@@ -0,0 +1,14 @@
+"""Ansible-lint version information."""
+try:
+ from ._version import version as __version__
+except ImportError: # pragma: no cover
+ try:
+ import pkg_resources
+
+ __version__ = pkg_resources.get_distribution("ansible-lint").version
+ except Exception: # pylint: disable=broad-except
+ # this is the fallback SemVer version picked by setuptools_scm when tag
+ # information is not available.
+ __version__ = "0.1.dev1"
+
+__all__ = ("__version__",)