[GRASS-dev] [GRASS-user] experimental Python 3 support in trunk

Markus Neteler neteler at osgeo.org
Tue Sep 4 06:43:19 PDT 2018


On Tue, Sep 4, 2018 at 3:21 PM Anna Petrášová <kratochanna at gmail.com> wrote:
> On Tue, Sep 4, 2018 at 2:00 AM Markus Neteler <neteler at osgeo.org> wrote:
...
>> ##################################################
>> # seen in the terminal:
>>
>>     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
>>
>
> as I said, that's the ctypes problem, weird is I don't get this specific problem, when I compile it, I get  PORT_LONG_MAX = 2147483647 (without the L)

On my Fedora 28 box, I get

[mneteler at oboe ctypes ]$ pwd
/home/mneteler/software/grass77/lib/python/ctypes

[mneteler at oboe ctypes ]$ ag PORT_LONG_MAX
OBJ.x86_64-pc-linux-gnu/vector.py
6562:    PORT_LONG_MAX = 2147483647L
7256:    PORT_LONG_MAX = 2147483647L

[mneteler at oboe ctypes ]$ gcc -v
...
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-gcc-major-version-only
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--with-isl --enable-libmpx --enable-offload-targets=nvptx-none
--without-cuda-driver --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC)

See (perhaps) also
https://trac.osgeo.org/grass/ticket/3446

where PORT_LONG_MAX is mentioned.

Markus


More information about the grass-dev mailing list