[GRASS-dev] Windows comatibility: python import pwd

Robert Kuszinger kuszinger at giscom.hu
Tue Sep 6 05:36:12 PDT 2016


Hello,

I've realized that m.printws won't compile on windows from the repository.

-------------------------------Information source:

https://wingrass.fsv.cvut.cz/grass70/x86_64/addons/latest/logs/

and especially:

https://wingrass.fsv.cvut.cz/grass70/x86_64/addons/latest/logs/m.printws.log

-------------------------------End of Log:

[...]
m.printws.tmp.html ; fi
Traceback (most recent call last):
  File "C:/Users/landa/grass_packager/grass705RC1/x86_64/addons/m.printws/scripts/m.printws.py",
line 177, in <module>
    import pwd
ImportError: No module named pwd
/c/msys64/usr/src/grass705RC1/include/Make/Html.make:14: recipe for
target 'm.printws.tmp.html' failed
make: *** [m.printws.tmp.html] Error 1
rm m.printws.tmp.html


I've realized that pwd module is not available on windows. Very well, I
made a functional workaround and the key part is this:

if os.name <> 'nt':
import pwd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160906/d34d8f6c/attachment.html>


More information about the grass-dev mailing list