[StGit PATCH 1/2] Import version to a separate namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The set of names we need from the version module is about to get too
large to list explicitly, but we don't want to pollute the local
namespace with every name from version. So do a qualified import of
the module.

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

 setup.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff --git a/setup.py b/setup.py
index 3be087c..04ca821 100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 import sys, glob, os
 from distutils.core import setup
 
-from stgit.version import version, git_min_ver, python_min_ver
+from stgit import version
 from stgit.run import Run
 
 def __version_to_list(version):
@@ -29,18 +29,18 @@ def __check_python_version():
     """Check the minimum Python version
     """
     pyver = '.'.join(str(n) for n in sys.version_info)
-    if not __check_min_version(python_min_ver, pyver):
+    if not __check_min_version(version.python_min_ver, pyver):
         print >> sys.stderr, 'Python version %s or newer required. Found %s' \
-              % (python_min_ver, pyver)
+              % (version.python_min_ver, pyver)
         sys.exit(1)
 
 def __check_git_version():
     """Check the minimum GIT version
     """
     gitver = Run('git', '--version').output_one_line().split()[2]
-    if not __check_min_version(git_min_ver, gitver):
+    if not __check_min_version(version.git_min_ver, gitver):
         print >> sys.stderr, 'GIT version %s or newer required. Found %s' \
-              % (git_min_ver, gitver)
+              % (version.git_min_ver, gitver)
         sys.exit(1)
 
 # Check the minimum versions required
@@ -52,7 +52,7 @@ if sys.argv[1] in ['install', 'build']:
 old_mask = os.umask(0022)
 
 setup(name = 'stgit',
-      version = version,
+      version = version.version,
       license = 'GPLv2',
       author = 'Catalin Marinas',
       author_email = 'catalin.marinas@xxxxxxxxx',

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux