[GRASS-dev] SWIG-Python lacking from install sequence in main Makefile

Hamish hamish_b at yahoo.com
Sun Jul 19 20:43:53 EDT 2009


> Hamish:
> > > building relbr6.4 swig/python/ from Debian/Etch (swig
> > > version 1.3.29-2.1) fails with:
> > > [...]
> > > utils_wrap.c: In function 'pyseq_to_ptr':
> > > utils_wrap.c:2495: error: 'Py_ssize_t' undeclared (first use in this function)
> > > [...]
> 
> Markus:
> > See
> > http://n2.nabble.com/grass7-build-failing-for-swig-python-td3074306.html
> > 
> > and
> > http://www.mail-archive.com/bug-gnubg@gnu.org/msg03894.html
> > http://www.mail-archive.com/bug-gnubg@gnu.org/msg03895.html
> > 
> > So, specific to the version which you use.

Hamish:
> As it is a >= version issue and not a bug in a specific release,
> some sort of #ifdef MAJOR_VERSION && MINOR_VERSION test around
> a #include <Python.h> seems in order.

I am trying to find where to handle something like that,
 - utils*.c is auto-generated by swig.
 - Python.h is found by ./configure and stored in Platform.make:PYTHONINC
   and PYTHONCFLAGS
 - Can something be added to the utils_wrap.c: Makefile rule ???



also from swig/python/README todo item: at build-time we should byte 
compile the .pyc version of our python libs so that users do not have
to wait a long time the first time they run GRASS. If installed without
write permissions by normal users (typical case for packaged Linux
anyway) .pyc files will not be cached and startup will always take a
long time.

e.g. on WinGRASS the wxGUI takes /very/ long to start up, with no feedback
except for hard drive access LED that anything is happening for like 20
seconds (ok, slow classmate PC netbook, but..) I am not totally sure
this is the main cause of that delay, but I'd wager that it doesn't help.


Hamish



      



More information about the grass-dev mailing list