[GRASS-dev] Makefile related problem? Re: [GRASS-user] Confused when using i.fusion.brovey
wenzeslaus at gmail.com
Mon Nov 10 07:40:15 PST 2014
On Mon, Nov 10, 2014 at 10:03 AM, Nikos Alexandris <nik at nikosalexandris.net>
> Nikos Alexandris wrote:
> > > I have this script
> > > <https://github.com/NikosAlexandris/i.fusion.hpf.py>. My local
> > > Makefile, with which I am trying to compile currently, is:
> > > MODULE_TOPDIR = ../..
> > >
> > > PGM = i.fusion.hpf
> > >
> > > ETCFILES = high_pass_filter constants
> > >
> > > include $(MODULE_TOPDIR)/include/Make/Script.make
> > > include $(MODULE_TOPDIR)/include/Make/Python.make
> > > * Is the order of entries in ETCFILES significant? (high_pass_filter
> > > needs stuff from constants)
> > > * While both files are to be found, after compilation, under
> > > </grass70/dist.x86_64-unknown-linux-gnu/etc/i.fusion.hpf>, the script
> > > runs fine only when executing it from *any*, if I understand
> > > correctly, directory in which the helper file(s)
> > > "high_pass_filter.py(c)" is(are) in.
> > > I can't work this out. Thank you, Nikos
> > Thanks to "r.in.wms", fixed by using this line:
> > +sys.path.insert(1, os.path.join(os.path.dirname(sys.path), 'etc',
> > 'r.in.wms'))
> This approach broke for my script i.fusion.hpf again. The sys.path is
> an empty string (now). I have
> no idea why it did work before.
> Is the approach in v.class.ml relevant/better/safer:
This is used on more places. I suggest to go with that although I'm afraid
it is not perfect either.
See other examples:
See the implementation:
See related tickets:
> grass-dev mailing list
> grass-dev at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev