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

Helmut Kudrnovsky hellik at web.de
Mon Sep 3 14:29:32 PDT 2018


Helmut Kudrnovsky wrote
> Markus Neteler wrote
>>>> Could you please post a few lines how to properly do the testing with
>>>> virtualenv?
>>>
>>> https://trac.osgeo.org/grass/wiki/Python3Support#Howtotest
>> 
>> Thanks.
>> I took liberty to expand that section a bit (a bit more text; and with
>> hints for Fedora users as well).
> 
> some notes added there how to compile winGRASS in a virtual python 3
> environment.

compiling winGRASS-python3 along this notes [but forgotten to do svn up
;-)]; with this old svn status, compilation


------------------------------------------
test at DESKTOP-VADT8Q4 MINGW64 /usr/src/grasspy3/grass_trunk
$ PACKAGE_POSTFIX=-daily OSGEO4W_POSTFIX=64 ./mswindows/osgeo4w/package.sh
GRASS GIS 7.7.svn r73230M compilation log
--------------------------------------------------
Started compilation: Mon Sep  3 21:01:57 CEST 2018
--
Errors in:
/usr/src/grasspy3/grass_trunk/lib/python/ctypes
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Mon Sep  3 21:58:44 CEST 2018
(grasspy3)
------------------------------------------

switching to the related directory

------------------------------------------
test at DESKTOP-VADT8Q4 MINGW64 /usr/src/grasspy3/grass_trunk
$ cd lib/python/ctypes
(grasspy3)
make

make
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/etc/python/grass/lib
make[1]: Entering directory
'/usr/src/grasspy3/grass_trunk/lib/python/ctypes'
make[1]:
'/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/etc/python/grass/lib'
is up to date.
make[1]: Leaving directory '/usr/src/grasspy3/grass_trunk/lib/python/ctypes'
make OBJ.x86_64-w64-mingw32/date.py OBJ.x86_64-w64-mingw32/gis.py
OBJ.x86_64-w64-mingw32/raster.py OBJ.x86_64-w64-mingw32/gmath.py O
[...]
dows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
" LC_ALL=C LANG=C LANGUAGE=C ./ctypesgen.py --cpp "gcc -E
-I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64     -I/usr/src/grasspy3/gras 
s_trunk/dist.x86_64-w64-mingw32/include
-I/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include
-D__GLIBC_HAVE_LONG_LONG" -l  
grass_gis.7.7.svn -lintl-8  
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/gis.h
/usr/src/grasspy3/grass_trunk  
/dist.x86_64-w64-mingw32/include/grass/defs/gis.h
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/colors.h
/usr/ 
src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/defs/colors.h
-o OBJ.x86_64-w64-mingw32/gis.py
Traceback (most recent call last):
  File "./ctypesgen.py", line 15, in <module>
    import optparse
ModuleNotFoundError: No module named 'optparse'
make[1]: *** [Makefile:102: OBJ.x86_64-w64-mingw32/gis.py] Error 1
make[1]: Leaving directory '/usr/src/grasspy3/grass_trunk/lib/python/ctypes'
make: *** [Makefile:81: default] Error 2
(grasspy3)
------------------------------------------

looking at

https://docs.python.org/2/library/optparse.html

15.5. optparse — Parser for command line options

New in version 2.3.

Deprecated since version 2.7: The optparse module is deprecated and will not
be developed further; development will continue with the argparse module.

so it's maybe already fixed; will do a fresh svn checkout and compilation.

no other issues found while compilation of winGRASS and python3



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html


More information about the grass-dev mailing list