[GRASS-SVN] r49935 - grass/branches/releasebranch_6_4/gui/scripts
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 27 13:05:30 EST 2011
Author: martinl
Date: 2011-12-27 10:05:29 -0800 (Tue, 27 Dec 2011)
New Revision: 49935
Modified:
grass/branches/releasebranch_6_4/gui/scripts/g.extension.py
Log:
g.extension.py: fix tidy citizen for python scripts
Modified: grass/branches/releasebranch_6_4/gui/scripts/g.extension.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/scripts/g.extension.py 2011-12-27 18:00:13 UTC (rev 49934)
+++ grass/branches/releasebranch_6_4/gui/scripts/g.extension.py 2011-12-27 18:05:29 UTC (rev 49935)
@@ -18,7 +18,7 @@
#############################################################################
#%module
-#% label: Tool to maintain the extensions in local GRASS installation.
+#% label: Maintains GRASS Addons extensions in local GRASS installation.
#% description: Downloads, installs extensions from GRASS Addons SVN repository into local GRASS installation or removes installed extensions.
#% keywords: general, installation, extensions
#%end
@@ -502,7 +502,7 @@
grass.message(_("Fetching <%s> from GRASS-Addons SVN (be patient)...") % options['extension'])
os.chdir(tmpdir)
- if grass.verbosity() == 0:
+ if grass.verbosity() <= 2:
outdev = open(os.devnull, 'w')
else:
outdev = sys.stdout
@@ -545,7 +545,7 @@
os.chdir(os.path.join(tmpdir, options['extension']))
- grass.message(_("Compiling <%s>...") % options['extension'])
+ grass.message(_("Compiling..."))
if options['extension'] not in gui_list:
ret = grass.call(makeCmd,
stdout = outdev)
@@ -560,7 +560,7 @@
if flags['i'] or options['extension'] in gui_list:
return
- grass.message(_("Installing <%s>...") % options['extension'])
+ grass.message(_("Installing..."))
return grass.call(installCmd,
stdout = outdev)
@@ -585,6 +585,9 @@
if os.path.exists(os.path.join(options['prefix'], 'scripts', options['extension'])):
shutil.move(os.path.join(options['prefix'], 'scripts', options['extension']),
os.path.join(options['prefix'], options['extension']))
+ if os.path.exists(os.path.join(options['prefix'], 'scripts', options['extension'] + '.py')):
+ shutil.move(os.path.join(options['prefix'], 'scripts', options['extension'] + '.py'),
+ os.path.join(options['prefix'], options['extension'] + '.py'))
if sys.platform == 'win32' and \
os.path.exists(os.path.join(options['prefix'], 'bin', options['extension']) + EXT_SCT):
shutil.move(os.path.join(options['prefix'], 'bin', options['extension']) + EXT_SCT,
More information about the grass-commit
mailing list