I know it's been a while since you announced this, but I'm just looking
into this now. My primary interest is having a build script that
selects the correct c++ compiler and get around a long-standing
distutils bug.
I'm running into a little speed bump here. It's failing on the
pkg-config detection of gtk. I have user-locally built and installed
packages for gtk (and many other things), so I set my PKG_CONFIG_PATH to
a custom location. However, it appears that scons isn't passing this
along to 'pkg-config'. By poking into scons.Action._subproc, it looks
like it is only passing a limited set of environment variables ("PATH",
"LD_LIBRARY_PATH" and "HOME") to the pkg-config subprocess. Is there an
scons way to get it to use this environment variable?
Mike
> python setupscons.py build
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
--compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
--fcompiler options
running build_src
build_src
building extension "matplotlib" sources
build_src: building npy-pkg config files
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running scons
customize UnixCCompiler
Found executable /usr/bin/gcc
customize GnuFCompiler
Found executable /usr/bin/g77
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
customize GnuFCompiler
gnu: no Fortran 90 compiler found
gnu: no Fortran 90 compiler found
Found executable /usr/bin/g77
customize UnixCCompiler
customize UnixCCompiler using scons
Found executable /usr/bin/g++
Executing scons command (pkg is matplotlib): /home/mdroe/usr/bin/python
"/home/mdroe/usr/lib/python2.5/site-packages/numscons/scons-local/scons.py"
-f SConstruct -I. scons_tool_path="" src_dir=""
pkg_path="lib/matplotlib" pkg_name="matplotlib" log_level=50
distutils_libdir="../../../build/lib.linux-i686-2.5"
distutils_clibdir="../../../build/temp.linux-i686-2.5"
distutils_install_prefix="/home/mdroe/usr/lib/python2.5/site-packages/matplotlib"
cc_opt=gcc cc_opt_path="/usr/bin" debug=0 f77_opt=g77
f77_opt_path="/usr/bin" cxx_opt=g++ cxx_opt_path="/usr/bin"
include_bootstrap=/home/mdroe/usr/lib/python2.5/site-packages/numpy/core/include
bypass=0 import_env=0 silent=0 bootstrapping=0
scons: Reading SConscript files ...
Mkdir("build/scons/matplotlib")
Checking for freetype2 ... Yes
Checking for png ... Yes
Package pygtk-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pygtk-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pygtk-2.0' found
OSError: 'pkg-config pygtk-2.0 gtk+-2.0 --cflags' exited 1:
File "/wonkabar/data1/builds/matplotlib_scons/SConstruct", line 2:
GetInitEnvironment(ARGUMENTS).DistutilsSConscript('SConscript')
File
"/home/mdroe/usr/lib/python2.5/site-packages/numscons/core/numpyenv.py",
line 135:
build_dir = '$build_dir', src_dir = '$src_dir')
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Script/SConscript.py",
line 553:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Script/SConscript.py",
line 262:
exec _file_ in call_stack[-1].globals
File
"/wonkabar/data1/builds/matplotlib_scons/build/scons/matplotlib/SConscript",
line 271:
if not config.CheckPyGTK():
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/SConf.py",
line 650:
ret = apply(self.test, (context,) + args, kw)
File
"/wonkabar/data1/builds/matplotlib_scons/build/scons/matplotlib/SConscript",
line 132:
pkg_config_cmd, autoadd=autoadd)
File
"/wonkabar/data1/builds/matplotlib_scons/build/scons/matplotlib/SConscript",
line 249:
return check_from_pkg_config(context, cmd_base, src, autoadd=autoadd)
File
"/wonkabar/data1/builds/matplotlib_scons/build/scons/matplotlib/SConscript",
line 61:
compile_info = context.env.ParseFlags([' '.join(cflags_cmd)])
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Environment.py",
line 791:
do_parse(arg, do_parse)
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Environment.py",
line 672:
for t in arg: me(t, me)
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Environment.py",
line 677:
arg = self.backtick(arg[1:])
File
"/wonkabar/data1/usr/lib/python2.5/site-packages/numscons/scons-local/scons-local-1.2.0/SCons/Environment.py",
line 593:
raise OSError("'%s' exited %d" % (command, status))
Checking for pygtk >= (2, 2, 0) ... error: Error while executing scons
command. See above for more information.
If you think it is a problem in numscons, you can also try executin