[PATCH] setup.py: don't try to import stgit.run before the python version check

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

 



stgit.run would import datetime, which is not available in older python
versions. import it just after the version check passed.

Signed-off-by: Miklos Vajna <vmiklos@xxxxxxxxxxxxxx>
---
 setup.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/setup.py b/setup.py
index 44cc6ea..a685cf6 100755
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,6 @@ import sys, glob, os
 from distutils.core import setup
 
 from stgit import version
-from stgit.run import Run
 
 def __version_to_list(version):
     """Convert a version string to a list of numbers or strings
@@ -68,6 +67,8 @@ if sys.argv[1] in ['install', 'build']:
     __check_python_version()
     __check_git_version()
 
+from stgit.run import Run
+
 # ensure readable template files
 old_mask = os.umask(0022)
 
-- 
1.5.6.2.450.g8d367.dirty

--
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