[GRASS-dev] Re: WinGRASS Wiki Hacking

Glynn Clements glynn at gclements.plus.com
Mon Jun 30 11:05:10 EDT 2008


Ivan Shmakov wrote:

>  >>>> I suppose that wxPython is probably the most important
>  >>>> omission. The main issue here is the lack of python-config on
>  >>>> Windows.
> 
>  >>> I didn't spent much time on it (I tried only few times to let it
>  >>> work without success, but I really didn't seriously try...), but I
>  >>> guess that the soultion would be here:
>  >>> http://wxconfig.googlepages.com/
> 
>  >> Okay, I'll try that later.
> 
>  > No luck. It seems to assume a standalone version of wxWidgets (mine
>  > is part of wxPython), and does nothing about the requirement for
>  > python-config.
> 
> 	Isn't `python-config' just a trivial wrapper around the
> 	functions provided by the `distutils.sysconfig' [1] (or
> 	whatever) Python module, made to allow simple (and conventional)
> 	access to these functions from the Shell?

Yes and no. It's a trivial wrapper, but it's platform-specific. The
config variables which the python-config script uses don't exist on
Windows:

>>> sysconfig.get_config_vars()
{'EXE': '.exe',
 'exec_prefix': 'c:\\progra~1\\Python25',
 'LIBDEST': 'c:\\progra~1\\Python25\\Lib',
 'prefix': 'c:\\progra~1\\Python25',
 'SO': '.pyd',
 'BINLIBDEST': 'c:\\progra~1\\Python25\\Lib',
 'INCLUDEPY': 'c:\\progra~1\\Python25\\include'}

The python-config script uses VERSION, CFLAGS, LIBS, SYSLIBS,
Py_ENABLE_SHARED and LIBPL.

On Linux, the returned dictionary has 134 entries.

> 	I've already suggested for GRASS to be switched to use
> 	`AC_PYTHON_DEVEL' (from the Autoconf macro archive), which
> 	doesn't depend on the wrapper and uses the Python interface
> 	directly.

I think that we may need to go that route.

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


More information about the grass-dev mailing list