From: Karl Hasselström Date: Wed, 16 Jul 2008 04:39:56 GMT Subject: Re: [PATCH] setup.py: don't try to import stgit.run before the python version check Message-ID: <20080716043956.GA31132@diana.vm.bytemark.co.uk> In-Reply-To: <1215806972-18713-2-git-send-email-vmiklos@frugalware.org> On 2008-07-11 22:09:32 +0200, Miklos Vajna wrote: > @@ -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) > I had to modify the second hunk to make it work: @@ -37,6 +36,7 @@ def __check_python_version(): def __check_git_version(): """Check the minimum GIT version """ + from stgit.run import Run gitver = Run('git', '--version').output_one_line().split()[2] if not __check_min_version(git_min_ver, gitver): print >> sys.stderr, 'GIT version %s or newer required. Found %s' \ -- Karl Hasselström, kha@treskal.com www.treskal.com/kalle