pywin32 missing

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

pywin32 missing

Anna Petrášová
Hi,

I am testing some changes in Python library on Windows and when I get over the current problem, I run into that I can't import win32file in core/gcmd.py. Some problem with packaging?

Thank you,

Anna

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Anna Petrášová
Related to wingrass, I committed some changes in script/core.py which might break something because I can't test it properly on Windows, but hopefully it will fix some issues

On Wed, May 15, 2019 at 12:44 PM Anna Petrášová <[hidden email]> wrote:
Hi,

I am testing some changes in Python library on Windows and when I get over the current problem, I run into that I can't import win32file in core/gcmd.py. Some problem with packaging?

Thank you,

Anna

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Anna Petrášová
Anna Petrášová wrote

> Hi,
>
> I am testing some changes in Python library on Windows and when I get over
> the current problem, I run into that I can't import win32file in
> core/gcmd.py. Some problem with packaging?
>
> Thank you,
>
> Anna
>
> _______________________________________________
> grass-dev mailing list

> grass-dev@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-dev

winGRASS 7.7.svn standalone or OSGeo4W-winGRASS7.7.svn?



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Anna Petrášová
standalone

On Wed, May 15, 2019 at 1:57 PM Helmut Kudrnovsky <[hidden email]> wrote:
Anna Petrášová wrote
> Hi,
>
> I am testing some changes in Python library on Windows and when I get over
> the current problem, I run into that I can't import win32file in
> core/gcmd.py. Some problem with packaging?
>
> Thank you,
>
> Anna
>
> _______________________________________________
> grass-dev mailing list

> grass-dev@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-dev

winGRASS 7.7.svn standalone or OSGeo4W-winGRASS7.7.svn?



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
Anna Petrášová wrote
> standalone

trying here with OSGeo4W-winGRASS7.7.svn

#########################
C:\>grass77svn ---text D:\grassdata\nc_spm_08_grass7\user1
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.
Cleaning up temporary files...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.7.svn (r74474M)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Command Prompt
(C:\WINDOWS\system32\cmd.exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

Launching <wxpython> GUI in the background, please wait...
Microsoft Windows [Version 10.0.17763.475]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>g.version --help
Displays GRASS GIS version info.

Benutzung:
 g.version [-cxbreg] [--help] [--verbose] [--quiet] [--ui]

Schalter:
  -c   Gebe auch die Copyright-Informationen aus
  -x   Print also the citation options
  -b   Print also the build information
  -r   Print also the GIS library revision number and date
  -e   Print also extended info for additional libraries
  -g   Gebe Info im Shell-Skript-Style aus (inklusive SVN Revisionsnummer)

C:\>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import win32com.client as win32
>>> import win32api
>>> import win32file
>>>

#########################

pywin32 and related things seems to work here.

are the related python packages in the bundled python
(Python37\lib\site-packages\win32)?



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Anna Petrášová


On Wed, May 15, 2019 at 3:48 PM Helmut Kudrnovsky <[hidden email]> wrote:
Anna Petrášová wrote
> standalone

trying here with OSGeo4W-winGRASS7.7.svn

#########################
C:\>grass77svn ---text D:\grassdata\nc_spm_08_grass7\user1
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.
Cleaning up temporary files...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.7.svn (r74474M)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Command Prompt
(C:\WINDOWS\system32\cmd.exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
If required, restart the GUI with:       g.gui wxpython
When ready to quit enter:                exit

Launching <wxpython> GUI in the background, please wait...
Microsoft Windows [Version 10.0.17763.475]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>g.version --help
Displays GRASS GIS version info.

Benutzung:
 g.version [-cxbreg] [--help] [--verbose] [--quiet] [--ui]

Schalter:
  -c   Gebe auch die Copyright-Informationen aus
  -x   Print also the citation options
  -b   Print also the build information
  -r   Print also the GIS library revision number and date
  -e   Print also extended info for additional libraries
  -g   Gebe Info im Shell-Skript-Style aus (inklusive SVN Revisionsnummer)

C:\>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import win32com.client as win32
>>> import win32api
>>> import win32file
>>>

#########################

pywin32 and related things seems to work here.

are the related python packages in the bundled python
(Python37\lib\site-packages\win32)?

no, win32 was not there as far as I remember 



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Anna Petrášová
Anna Petrášová wrote
> Hi,
>
> I am testing some changes in Python library on Windows and when I get over
> the current problem, I run into that I can't import win32file in
> core/gcmd.py. Some problem with packaging?

applied locally your commits (r74480), I get:

############################
C:\>grass77svn --text
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.
Cleaning up temporary files...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.7.svn (r74474M)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Command Prompt
(C:\WINDOWS\system32\cmd.exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
Start the GUI with:                      g.gui wxpython
When ready to quit enter:                exit

Microsoft Windows [Version 10.0.17763.475]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>g.gui wxpython
Starte <wxpython> GUI im Hintergrund. Bitte warten Sie ...
C:\OSGEO4~1\apps\grass\grass77/gui/wxpython/wxgui.py:101:
DeprecationWarning: Yield() is deprecated
  wx.Yield()
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77/gui/wxpython/wxgui.py", line 106, in
OnInit
    workspace=self.workspaceFile)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\lmgr\frame.py", line
131, in __init__
    self._moduleTreeBuilder =
LayerManagerModuleTree(message_handler=add_menu_error)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\lmgr\menudata.py", line
68, in __init__
    message_handler=message_handler)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\menutree.py", line
71, in __init__
    xmlTree = etree.parse(filename)
  File "C:\OSGEO4~1\apps\Python37\lib\xml\etree\ElementTree.py", line 1197,
in parse
    tree.parse(source, parser)
  File "C:\OSGEO4~1\apps\Python37\lib\xml\etree\ElementTree.py", line 598,
in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
OnInit returned false, exiting...
############################




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Anna Petrášová
Did you compile it with those local changes? It needs to be compiled to create the xml files.

On Wed, May 15, 2019 at 3:56 PM Helmut Kudrnovsky <[hidden email]> wrote:
Anna Petrášová wrote
> Hi,
>
> I am testing some changes in Python library on Windows and when I get over
> the current problem, I run into that I can't import win32file in
> core/gcmd.py. Some problem with packaging?

applied locally your commits (r74480), I get:

############################
C:\>grass77svn --text
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.
Cleaning up temporary files...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.7.svn (r74474M)
GRASS GIS homepage:                      https://grass.osgeo.org
This version running through:            Command Prompt
(C:\WINDOWS\system32\cmd.exe)
Help is available with the command:      g.manual -i
See the licence terms with:              g.version -c
See citation options with:               g.version -x
Start the GUI with:                      g.gui wxpython
When ready to quit enter:                exit

Microsoft Windows [Version 10.0.17763.475]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\>g.gui wxpython
Starte <wxpython> GUI im Hintergrund. Bitte warten Sie ...
C:\OSGEO4~1\apps\grass\grass77/gui/wxpython/wxgui.py:101:
DeprecationWarning: Yield() is deprecated
  wx.Yield()
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\grass\grass77/gui/wxpython/wxgui.py", line 106, in
OnInit
    workspace=self.workspaceFile)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\lmgr\frame.py", line
131, in __init__
    self._moduleTreeBuilder =
LayerManagerModuleTree(message_handler=add_menu_error)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\lmgr\menudata.py", line
68, in __init__
    message_handler=message_handler)
  File "C:\OSGEO4~1\apps\grass\grass77\gui\wxpython\core\menutree.py", line
71, in __init__
    xmlTree = etree.parse(filename)
  File "C:\OSGEO4~1\apps\Python37\lib\xml\etree\ElementTree.py", line 1197,
in parse
    tree.parse(source, parser)
  File "C:\OSGEO4~1\apps\Python37\lib\xml\etree\ElementTree.py", line 598,
in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
OnInit returned false, exiting...
############################




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Anna Petrášová
Anna Petrášová wrote
>> are the related python packages in the bundled python
>> (Python37\lib\site-packages\win32)?
>>
>
> no, win32 was not there as far as I remember

looking at

https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/setup_x86_64.hint.tmpl

requires: liblas avce00 gpsbabel gs python3-gdal python3-matplotlib msvcrt
msvcrt2013 msvcrt2015 iconv libtiff gdal proj pdcurses zlib fftw libpng
python3-wx python3-numpy python3-pillow python3-pip python3-ply
python3-pyopengl cairo python3-psycopg2 python3-six rbatch zstd zstd-bin
python3-pywin32 <=

https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/osgeo4w/setup_x86.hint.tmpl

requires: liblas avce00 gpsbabel gs python3-gdal python3-matplotlib msvcrt
msvcrt2013 msvcrt2015 iconv libtiff gdal proj freetype-mingw pdcurses zlib
fftw libpng python3-wx python3-numpy python3-pillow python3-pip python3-ply
python3-pyopengl cairo python3-psycopg2 python3-six rbatch zstd zstd-bin
python3-pywin32

there is pywin32 as a requirement for winGRASS.

comparing the OSGeo4W python3

C:\OSGeo4W64\apps\Python37\lib\site-packages\win32\

and a win32file inside

with a just downloaded
https://wingrass.fsv.cvut.cz/grass77/x86_64/WinGRASS-7.7.svn-r74475M-23-Setup-x86_64.exe

WinGRASS-7.7.svn-r74475M-23-Setup-x86_64\$_93_\Python37\Lib\site-packages

there is no win32-site package inside.

it's an package issue.









-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Anna Petrášová
Anna Petrášová wrote
> Did you compile it with those local changes? It needs to be compiled to
> create the xml files.

no compilation yet, just copied the updated python script.

which is the relevant xml-file?




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Helmut Kudrnovsky
Helmut Kudrnovsky wrote
> there is no win32-site package inside.
>
> it's an package issue.

looking at
https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/GRASS-Packager.bat.tmpl#L98

96 @echo.
97 @echo
-----------------------------------------------------------------------------------------------------------------------
98 @echo Copy Python content to PACKAGE_DIR\Python37
99 @echo
-----------------------------------------------------------------------------------------------------------------------
100 @echo.
101
102 mkdir %PACKAGE_DIR%\Python37
103
104 xcopy %OSGEO4W_PKG_DIR%\apps\Python37\* %PACKAGE_DIR%\Python37 /S/V/F/I

the OSGeo4W-package environment on Martin's build server has to be upated to
include pywin32.




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Anna Petrášová
In reply to this post by Helmut Kudrnovsky


On Wed, May 15, 2019 at 4:14 PM Helmut Kudrnovsky <[hidden email]> wrote:
Anna Petrášová wrote
> Did you compile it with those local changes? It needs to be compiled to
> create the xml files.

no compilation yet, just copied the updated python script.

which is the relevant xml-file?

it creates gui/wxpython/xml/menudata.xml and module_tree_menudata.xml during compilation.
 




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
Anna Petrášová wrote
>> which is the relevant xml-file?
>>
>
> it creates gui/wxpython/xml/menudata.xml and module_tree_menudata.xml
> during compilation.

module_tree_menudata.xml is empty here. I have to wait for the next daily
build to test.




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
Helmut Kudrnovsky wrote
> Anna Petrášová wrote
>>> which is the relevant xml-file?
>>>
>>
>> it creates gui/wxpython/xml/menudata.xml and module_tree_menudata.xml
>> during compilation.
>
> module_tree_menudata.xml is empty here. I have to wait for the next daily
> build to test.

daily winGRASS trunk is at r74479-24, so 1 behind r74480: pythonlib: cleanup
decoding/encoding in scripting library

let's see the next daily build




-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut
Reply | Threaded
Open this post in threaded view
|

Re: pywin32 missing

Helmut Kudrnovsky
In reply to this post by Anna Petrášová
Anna Petrášová wrote
> On Wed, May 15, 2019 at 4:14 PM Helmut Kudrnovsky &lt;

> hellik@

> &gt; wrote:
>
>> Anna Petrášová wrote
>> > Did you compile it with those local changes? It needs to be compiled to
>> > create the xml files.
>>
>> no compilation yet, just copied the updated python script.
>>
>> which is the relevant xml-file?
>>
>
> it creates gui/wxpython/xml/menudata.xml and module_tree_menudata.xml
> during compilation.

now self compiled winGRASS

###########

C:\>grass77svn --text
Starting GRASS GIS...
WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows
         nicht möglich.
Cleaning up temporary files...

          __________  ___   __________    _______________
         / ____/ __ \/   | / ___/ ___/   / ____/  _/ ___/
        / / __/ /_/ / /| | \__ \\_  \   / / __ / / \__ \
       / /_/ / _, _/ ___ |___/ /__/ /  / /_/ // / ___/ /
       \____/_/ |_/_/  |_/____/____/   \____/___//____/

Welcome to GRASS GIS 7.7.svn (r74506M)

############

module_tree_menudata.xml is still empty after compilation



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
_______________________________________________
grass-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-dev
best regards
Helmut