[GRASS-dev] [GRASS GIS] #2132: Create a system for building and running GRASS modules written in Python

GRASS GIS trac at osgeo.org
Tue Nov 12 14:33:11 PST 2013


#2132: Create a system for building and running GRASS modules written in Python
-------------------------------------------------------+--------------------
 Reporter:  wenzeslaus                                 |       Owner:  grass-dev@…              
     Type:  defect                                     |      Status:  new                      
 Priority:  normal                                     |   Milestone:  7.0.0                    
Component:  Python                                     |     Version:  svn-trunk                
 Keywords:  makefiles, addons, path, python, packages  |    Platform:  All                      
      Cpu:  All                                        |  
-------------------------------------------------------+--------------------

Comment(by zarch):

 Hi Vaclav,

 I can not help to fix the Makefile, It is mysterious to me too!

 [[BR]]

 > Probably in both cases we need some function which will determine
 > where the package is and will add the path (sys.path) correctly.
 > This function can be in grass.utils, so it will be not necessary
 > to repeat the same code in all modules and then change it when
 > there is an error in it. It could be something like:

 [cut]

 [[BR]]

 I did, and is already in the trunk, maybe we should put in some other
 place, at the moment is in
 [http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/functions.py#L268
 pygrass/functions.py] you can find an example of use in
 [http://trac.osgeo.org/grass/browser/grass-
 addons/grass7/imagery/i.segment.hierarchical/i.segment.hierarchical.py#L153
 i.segment.hierarchical]

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2132#comment:1>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list