Re: [PATCH] setup.py: don't try to import stgit.run before the python version check
On 2008-07-11 22:09:32 +0200, Miklos Vajna wrote:
Show 9 quoted lines
> @@ -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