[GRASS-dev] [GRASS GIS] #2708: Run GRASS with Python3

GRASS GIS trac at osgeo.org
Thu Jul 23 06:12:18 PDT 2015

#2708: Run GRASS with Python3
  Reporter:  zarch        |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.0.1
 Component:  Default      |    Version:  unspecified
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  Unspecified

Comment (by glynn):

 Replying to [comment:4 zarch]:
 > Do you think that I could commit these changes in trunk?

 What's the oldest Python 2.x version they will work with?

 Support for 2.7 is essential. We've been trying to maintain support for
 2.6, but that may have to change in order to support 3.x.

 > However I don't know how to fix the ctypes binding of GRASS, at the
 moment I get:

 > But these files are generated with make and I don't understand where
 should I change the code. Any hint?

 The lib/python/ctypes/fix.sed script inserts those imports.

 If the `__future__` import needs to be at the very start of the file, add
 the command
 1i \
 from __future__ import absolute_import
 to the script.

 If it just needs to be before any imports, add it to the start of the
 existing imports in the script.

Ticket URL: <https://trac.osgeo.org/grass/ticket/2708#comment:5>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list