Merge pull request #33 from apache/tristan/encode-docs-version
Encode hard coded version in one location instead of two
diff --git a/.pylintrc b/.pylintrc
index 35a42e6..96bd85b 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -80,14 +80,14 @@
# pylint to also check for those things.
#
-disable=#####################################
+disable=
+ #####################################
# Messages that are of no use to us #
#####################################
,
consider-using-f-string,
fixme,
missing-docstring,
- no-self-use,
no-else-return,
protected-access,
too-few-public-methods,
@@ -133,7 +133,6 @@
# Formatting-related messages, enforced by Black #
##################################################
- bad-continuation,
line-too-long,
superfluous-parens,
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 1c0a614..563fed7 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -19,6 +19,8 @@
#
import os
import sys
+from buildstream_plugins import __version__
+
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration ------------------------------------------------
@@ -62,9 +64,9 @@
# built documents.
#
# The short X.Y version.
-version = '1.91'
+version = __version__
# The full version, including alpha/beta/rc tags.
-release = '1.91.0'
+release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/setup.py b/setup.py
index c1fcb66..bf28027 100755
--- a/setup.py
+++ b/setup.py
@@ -37,10 +37,16 @@
) as readme:
long_description = readme.read()
+###############################################################################
+# Load the version #
+###############################################################################
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "src"))
+from buildstream_plugins import __version__ # pylint: disable=wrong-import-position
+
setup(
name="buildstream-plugins",
- version="1.95.1",
+ version=__version__,
author="BuildStream Developers",
author_email="dev@buildstream.apache.org",
classifiers=[
diff --git a/src/buildstream_plugins/__init__.py b/src/buildstream_plugins/__init__.py
index e69de29..e0d37ee 100644
--- a/src/buildstream_plugins/__init__.py
+++ b/src/buildstream_plugins/__init__.py
@@ -0,0 +1,4 @@
+#
+# Remember to adjust this version number before tagging releases
+#
+__version__ = "1.95.1"