[GRASS-dev] WinGrass65 + import gui_modules.nviz_tools as nviz_tools: ImportError

Glynn Clements glynn at gclements.plus.com
Sun Jun 20 11:07:18 EDT 2010


Helmut Kudrnovsky wrote:

> > When compiling /lib/python/ against `lintl3` instead of `lintl`,
> > grass.libs.grass can be imported, but its empty.
> 
> Check for any error/warning messages during creation.
> 
> some error messages from compiling:

> make[5]: Entering directory `/c/osgeo4w/usr/src/grass_trunk/lib/python/ctypes'
> GISRC=/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/demolocation/.grassrc70 GISBASE=c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32 PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:$PATH" PYTHONPATH="c:/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/etc/python;$PYTHONPATH" PATH="/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/bin:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/lib:.:/c/mingw/bin:/usr/local/bin:/bin:/c/OSGeo4W/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem" LC_ALL=C ./ctypesgen.py --cpp "gcc -E      -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include" -lgrass_datetime.7.0.svn  -lintl /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/datetime.h /c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include/grass/P_datetime.h -o date.py
> Status: Preprocessing c:\users\syringia\appdata\local\temp\tmpr5m9dp.h
> Status: gcc -E      -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -U __GNUC__ -dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-DCTYPESGEN=1" c:\users\syringia\appdata\local\temp\tmpr5m9dp.h
> Error: gcc -E      -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include -I/c/osgeo4w/usr/src/grass_trunk/dist.i686-pc-mingw32/include: cc1.exe: c:\users\syringia\appdata\local\temp\tmpr5m9dp.h: Permission denied

Well, that's going to be fatal.

Urgh; ctypesgencore/parser/datacollectingparser.py:

    def parse(self):
        f = NamedTemporaryFile(suffix=".h")
        for header in self.options.other_headers:
            print >>f, '#include <%s>' % header
        for header in self.headers:
            print >>f, '#include "%s"' % os.path.abspath(header)
        f.flush()
        ctypesparser.CtypesParser.parse(self,f.name,None)
        f.close()

Windows won't let gcc open the file while Python has it open, but
closing it will cause the file to be deleted.

Try r42601.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list