[GRASS-dev] [GRASS GIS] #3883: GRASS master does not compile with Python 3 on Mac

GRASS GIS trac at osgeo.org
Fri Feb 21 09:05:48 PST 2020


#3883: GRASS master does not compile with Python 3 on Mac
--------------------------+-------------------------
  Reporter:  cmbarton     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  major        |  Milestone:  7.8.3
 Component:  Default      |    Version:  svn-trunk
Resolution:               |   Keywords:
       CPU:  Unspecified  |   Platform:  MacOSX
--------------------------+-------------------------

Comment (by cmbarton):

 Replying to [comment:12 nila]:

 This is great news. I'll try it out.

 > While not getting to the root of the problem, there is a workaround that
 seem to work:
 >
 > adding `encoding='latin1'` to `subprocess.Popen` at
 > (`lib/python/ctypes/ctypesgencore/parser/preprocessor.py:170`)
 >
 > enables compilation, seemingly without issues.
 >
 > {{{
 > ---
 >  lib/python/ctypes/ctypesgencore/parser/preprocessor.py | 1 +
 >  1 file changed, 1 insertion(+)
 >  mode change 100644 => 100755
 lib/python/ctypes/ctypesgencore/parser/preprocessor.py
 >
 > diff --git a/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
 b/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
 > old mode 100644
 > new mode 100755
 > index 18999483e..1d0dd8749
 > --- a/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
 > +++ b/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
 > @@ -168,6 +168,7 @@ class PreprocessorParser(object):
 >          pp = subprocess.Popen(cmd,
 >                                shell=True,
 >                                universal_newlines=True,
 > +                              encoding='latin1',
 >                                stdout=subprocess.PIPE,
 >                                stderr=subprocess.PIPE)
 >          ppout, pperr = pp.communicate()
 > --
 > 2.23.0
 > }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3883#comment:14>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list