<div dir="ltr"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 3, 2018 at 5:29 PM Helmut Kudrnovsky <<a href="mailto:hellik@web.de">hellik@web.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Helmut Kudrnovsky wrote<br>
> Markus Neteler wrote<br>
>>>> Could you please post a few lines how to properly do the testing with<br>
>>>> virtualenv?<br>
>>><br>
>>> <a href="https://trac.osgeo.org/grass/wiki/Python3Support#Howtotest" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/wiki/Python3Support#Howtotest</a><br>
>> <br>
>> Thanks.<br>
>> I took liberty to expand that section a bit (a bit more text; and with<br>
>> hints for Fedora users as well).<br>
> <br>
> some notes added there how to compile winGRASS in a virtual python 3<br>
> environment.<br>
<br>
compiling winGRASS-python3 along this notes [but forgotten to do svn up<br>
;-)]; with this old svn status, compilation<br>
<br>
<br>
------------------------------------------<br>
test@DESKTOP-VADT8Q4 MINGW64 /usr/src/grasspy3/grass_trunk<br>
$ PACKAGE_POSTFIX=-daily OSGEO4W_POSTFIX=64 ./mswindows/osgeo4w/package.sh<br>
GRASS GIS 7.7.svn r73230M compilation log<br>
--------------------------------------------------<br>
Started compilation: Mon Sep 3 21:01:57 CEST 2018<br>
--<br>
Errors in:<br>
/usr/src/grasspy3/grass_trunk/lib/python/ctypes<br>
--<br>
In case of errors please change into the directory with error and run<br>
'make'.<br>
If you get multiple errors, you need to deal with them in the order they<br>
appear in the error log. If you get an error building a library, you will<br>
also get errors from anything which uses the library.<br>
--<br>
Finished compilation: Mon Sep 3 21:58:44 CEST 2018<br>
(grasspy3)<br>
------------------------------------------<br>
<br>
switching to the related directory<br>
<br>
------------------------------------------<br>
test@DESKTOP-VADT8Q4 MINGW64 /usr/src/grasspy3/grass_trunk<br>
$ cd lib/python/ctypes<br>
(grasspy3)<br>
make<br>
<br>
make<br>
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/etc/python/grass/lib<br>
make[1]: Entering directory<br>
'/usr/src/grasspy3/grass_trunk/lib/python/ctypes'<br>
make[1]:<br>
'/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/etc/python/grass/lib'<br>
is up to date.<br>
make[1]: Leaving directory '/usr/src/grasspy3/grass_trunk/lib/python/ctypes'<br>
make OBJ.x86_64-w64-mingw32/date.py OBJ.x86_64-w64-mingw32/gis.py<br>
OBJ.x86_64-w64-mingw32/raster.py OBJ.x86_64-w64-mingw32/gmath.py O<br>
[...]<br>
dows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl<br>
" LC_ALL=C LANG=C LANGUAGE=C ./ctypesgen.py --cpp "gcc -E<br>
-I/c/OSGeo4W64/include -D_FILE_OFFSET_BITS=64 -I/usr/src/grasspy3/gras <br>
s_trunk/dist.x86_64-w64-mingw32/include<br>
-I/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include<br>
-D__GLIBC_HAVE_LONG_LONG" -l <br>
grass_gis.7.7.svn -lintl-8 <br>
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/gis.h<br>
/usr/src/grasspy3/grass_trunk <br>
/dist.x86_64-w64-mingw32/include/grass/defs/gis.h<br>
/usr/src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/colors.h<br>
/usr/ <br>
src/grasspy3/grass_trunk/dist.x86_64-w64-mingw32/include/grass/defs/colors.h<br>
-o OBJ.x86_64-w64-mingw32/gis.py<br>
Traceback (most recent call last):<br>
File "./ctypesgen.py", line 15, in <module><br>
import optparse<br>
ModuleNotFoundError: No module named 'optparse'<br>
make[1]: *** [Makefile:102: OBJ.x86_64-w64-mingw32/gis.py] Error 1<br>
make[1]: Leaving directory '/usr/src/grasspy3/grass_trunk/lib/python/ctypes'<br>
make: *** [Makefile:81: default] Error 2<br>
(grasspy3)<br>
------------------------------------------<br>
<br>
looking at<br>
<br>
<a href="https://docs.python.org/2/library/optparse.html" rel="noreferrer" target="_blank">https://docs.python.org/2/library/optparse.html</a><br>
<br>
15.5. optparse — Parser for command line options<br>
<br>
New in version 2.3.<br>
<br>
Deprecated since version 2.7: The optparse module is deprecated and will not<br>
be developed further; development will continue with the argparse module.<br></blockquote><div><br></div><div>Can you add optparse package? It's weird, it should be part of standard Python library:</div><div><a href="https://docs.python.org/3.7/library/optparse.html">https://docs.python.org/3.7/library/optparse.html</a><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
so it's maybe already fixed; will do a fresh svn checkout and compilation.<br>
<br>
no other issues found while compilation of winGRASS and python3<br>
<br>
<br>
<br>
-----<br>
best regards<br>
Helmut<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html</a><br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-dev</a></blockquote></div></div></div>