[GRASS-dev] [GRASS GIS] #3731: winGRASS7.7.svn - ctypes - python 3 issues

GRASS GIS trac at osgeo.org
Sat Jan 12 06:34:01 PST 2019


#3731: winGRASS7.7.svn - ctypes - python 3 issues
----------------------------+------------------------------------
  Reporter:  martinl        |      Owner:  grass-dev@…
      Type:  defect         |     Status:  new
  Priority:  normal         |  Milestone:  7.8.0
 Component:  Python ctypes  |    Version:  svn-trunk
Resolution:                 |   Keywords:  wingrass, python3, py3
       CPU:  Unspecified    |   Platform:  Unspecified
----------------------------+------------------------------------

Comment (by hellik):

 Replying to [comment:2 neteler]:
 >
 >
 > ---------- Forwarded message ---------
 > From: Anna Petrášová <kratochanna at gmail.com>
 > Date: Do., 13. Sep. 2018, 22:30
 > Subject: Re: [GRASS-user] experimental Python 3 support in trunk
 >
 >
 > On Tue, Sep 4, 2018 at 2:00 AM Markus Neteler <neteler at osgeo.org> wrote:
 > On Tue, Sep 4, 2018 at 12:39 AM Anna Petrášová <kratochanna at gmail.com>
 wrote:
 >
 > {{{
 >     from grass.pygrass.vector import VectorTopo
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/vector/__init__.py",
 > line 7, in <module>
 >     import grass.lib.vector as libvect
 >   File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-
 gnu/etc/python/grass/lib/vector.py",
 > line 5863
 >     PORT_LONG_MAX = 2147483647L
 >                               ^
 > SyntaxError: invalid syntax
 >
 > }}}
 >
 > regarding this issue, make sure you compile GRASS with Python 3. I get
 this if I compile it with Python2 and then open it with Python 3.
 >
 > Anna

 for compilation in package.sh we do:

 {{{
 # Force Python3
 alias python=python3
 }}}

 adding later in the script e.g.


 {{{
 [...]
 exec 3>&1 >> mswindows/osgeo4w/package.log 2>&1
 python --version
 [...]
 }}}

 I get

 {{{
 Python 3.7.2
 Sat Jan 12 15:29:17 CET 2019: STARTING dll.to.a
 /c/OSGeo4W64/bin/proj_5_2.dll => mswindows/osgeo4w/lib/libproj
 [...]
 }}}

 it seems python3 is used for compilation.

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



More information about the grass-dev mailing list