[GRASS-SVN] r70535 - in grass/trunk: scripts/g.extension tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 11 14:55:04 PST 2017
Author: martinl
Date: 2017-02-11 14:55:04 -0800 (Sat, 11 Feb 2017)
New Revision: 70535
Modified:
grass/trunk/scripts/g.extension/g.extension.py
grass/trunk/tools/mkhtml.py
Log:
broken links to source code and history in add-ons user manuals (see #3224)
(wingrass addons builds broken by r70514)
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2017-02-11 22:24:38 UTC (rev 70534)
+++ grass/trunk/scripts/g.extension/g.extension.py 2017-02-11 22:55:04 UTC (rev 70535)
@@ -1170,8 +1170,7 @@
'SCRIPTDIR=%s' % dirs['script'],
'STRINGDIR=%s' % dirs['string'],
'ETC=%s' % os.path.join(dirs['etc']),
- 'SOURCE_URL=%s' % source_url,
- 'BASEDIR=%s' % TMPDIR,
+ 'SOURCE_URL=%s' % source_url
]
install_cmd = [
Modified: grass/trunk/tools/mkhtml.py
===================================================================
--- grass/trunk/tools/mkhtml.py 2017-02-11 22:24:38 UTC (rev 70534)
+++ grass/trunk/tools/mkhtml.py 2017-02-11 22:55:04 UTC (rev 70535)
@@ -316,8 +316,10 @@
curdir = os.path.abspath(os.path.curdir)
pgmdir = curdir.replace(topdir, '').lstrip('/')
if os.getenv('SOURCE_URL', ''):
+ import tempfile
# addons
- pgmname = os.getcwd()[len(os.environ['BASEDIR'])+1:]
+ basename = os.getcwd()[len(tempfile.gettempdir())+1:]
+ pgmname = basename[basename.find(os.path.sep)+1:]
classname = index_names[pgmname[:pgmname.find('.')]]
url_source = urlparse.urljoin('{0}{1}/'.format(os.environ['SOURCE_URL'], classname),
pgmname)
More information about the grass-commit
mailing list