[GRASS-SVN] r67196 - grass/branches/releasebranch_7_0/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 17 01:11:02 PST 2015
Author: martinl
Date: 2015-12-17 01:11:02 -0800 (Thu, 17 Dec 2015)
New Revision: 67196
Modified:
grass/branches/releasebranch_7_0/scripts/g.extension/g.extension.py
Log:
g.extension: fix windows 32/64bit issue
(merge r67194 from trunk)
Modified: grass/branches/releasebranch_7_0/scripts/g.extension/g.extension.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/g.extension/g.extension.py 2015-12-17 09:10:56 UTC (rev 67195)
+++ grass/branches/releasebranch_7_0/scripts/g.extension/g.extension.py 2015-12-17 09:11:02 UTC (rev 67196)
@@ -695,10 +695,16 @@
# install extension on MS Windows
def install_extension_win(name):
- ### do not use hardcoded url - http://wingrass.fsv.cvut.cz/grassXX/addonsX.X.X
- grass.message(_("Downloading precompiled GRASS Addons <%s>...") % options['extension'])
- url = "http://wingrass.fsv.cvut.cz/grass%(major)s%(minor)s/addons/grass-%(major)s.%(minor)s.%(patch)s/" % \
- { 'major' : version[0], 'minor' : version[1], 'patch' : version[2]}
+ """Install extension on MS Windows"""
+ # do not use hardcoded url -
+ # http://wingrass.fsv.cvut.cz/platform/grassXX/addonsX.X.X
+ grass.message(_("Downloading precompiled GRASS Addons <%s>...") %
+ options['extension'])
+ url = "http://wingrass.fsv.cvut.cz/%(platform)s/" \
+ "grass%(major)s%(minor)s/addons/" \
+ "grass-%(major)s.%(minor)s.%(patch)s/" % \
+ {'platform' : build_platform, 'major': version[0],
+ 'minor': version[1], 'patch': version[2]}
grass.debug("url=%s" % url, 1)
@@ -1111,5 +1117,9 @@
global TMPDIR
TMPDIR = tempfile.mkdtemp()
atexit.register(cleanup)
- version = grass.version()['version'].split('.')
+
+ grass_version = grass.version()
+ version = grass_version['version'].split('.')
+ build_platform = grass_version['build_platform'].split('-', 1)[0]
+
sys.exit(main())
More information about the grass-commit
mailing list