From: Ondrej Lichtner <olichtne(a)redhat.com>
Separating the version number into it's own file to avoid dependency
resolution issues.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/Config.py | 3 +--
lnst/Common/Version.py | 14 ++++++++++++++
setup.py | 2 +-
3 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 lnst/Common/Version.py
diff --git a/lnst/Common/Config.py b/lnst/Common/Config.py
index 7b4d17e..0b8b03e 100644
--- a/lnst/Common/Config.py
+++ b/lnst/Common/Config.py
@@ -17,11 +17,10 @@ import subprocess
from lnst.Common.Utils import bool_it
from lnst.Common.NetUtils import verify_mac_address
from lnst.Common.Colours import get_preset_conf
+from lnst.Common.Version import LNSTMajorVersion
DefaultRPCPort = 9999
-LNSTMajorVersion = '11'
-
class ConfigError(Exception):
pass
diff --git a/lnst/Common/Version.py b/lnst/Common/Version.py
new file mode 100644
index 0000000..bafbb83
--- /dev/null
+++ b/lnst/Common/Version.py
@@ -0,0 +1,14 @@
+"""
+Module containing just the version number of the package, needs to be separated
+to avoid dependency resolution conflicst during setup.py execution.
+
+Copyright 2016 Red Hat, Inc.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__autor__ = """
+olichtne(a)redhat.com (Ondrej Lichtner)
+"""
+
+LNSTMajorVersion = '11'
diff --git a/setup.py b/setup.py
index 144e25c..41b86b3 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ import gzip
import os
from time import gmtime, strftime
from distutils.core import setup
-from lnst.Common.Config import LNSTMajorVersion
+from lnst.Common.Version import LNSTMajorVersion
def process_template(template_path, values):
template_name_re = "\.in$"
--
2.9.0