[GRASS-dev] GRASS 7 add-ons on Mac OSX (10.9)

Markus Neteler neteler at osgeo.org
Sat Sep 20 04:39:48 PDT 2014


On Sat, Sep 20, 2014 at 1:04 PM, Johannes Radinger
<johannesradinger at gmail.com> wrote:
> Has this issue with the white space in the path ("...some proper quoting
> will be missing.") bin solved in recent versions of GRASS71? Both available
> binaries (http://grassmac.wikidot.com/downloads from Aug 14) for GRASS70
> beta and GRASS71 show this problem. Just tested again with "v.surf.icw":

...
>> On Fri, Aug 15, 2014 at 6:07 PM, Markus Neteler <neteler at osgeo.org> wrote:
>>> ...
>>> ERROR: Compilation failed, sorry. Please check above error messages.
>>> if [
>>> "/var/folders/z6/kpf8b53j04vcgq71ycrqzs040000gq/T/tmptRWIEo/r.fuzzy.system/bin/r.fuzzy.system"
>>> != "" ] ; then
>>> GISRC=/var/folders/z6/kpf8b53j04vcgq71ycrqzs040000gq/T/grass7-Johannes
>>> Radinger-2668/gisrc
>>>
>>> --> "...Johannes Radinger..."
>>>
>>> So some proper quoting will be missing.


Wild guess: scripts/g.extension./g.extension.py line 757 ff:

    makeCmd = ['make',
               'MODULE_TOPDIR=%s' % gisbase.replace(' ', '\ '),
               'RUN_GISRC=%s' % os.environ['GISRC'],
               'BIN=%s' % dirs['bin'],
               'HTMLDIR=%s' % dirs['html'],
               'RESTDIR=%s' % dirs['rest'],
               'MANDIR=%s' % dirs['man'],
               'SCRIPTDIR=%s' % dirs['script'],
               'STRINGDIR=%s' % dirs['string'],
               'ETC=%s' % os.path.join(dirs['etc'], name)
    ]

    installCmd = ['make',
                  'MODULE_TOPDIR=%s' % gisbase,
                  'ARCH_DISTDIR=%s' % os.path.join(TMPDIR, name),
                  'INST_DIR=%s' % options['prefix'],
                  'install'
                  ]

Does this have anything to do with
https://docs.python.org/2/library/subprocess.html#frequently-used-arguments

"When using shell=True, pipes.quote() can be used to properly escape
whitespace and shell metacharacters in strings that are going to be
used to construct shell commands."
?

Markus


More information about the grass-dev mailing list