Saturday, 17 August 2013

Why can't I install pyXML? Where do these env vars come from?

Why can't I install pyXML? Where do these env vars come from?

I'm trying to install pyXML on Solaris 10.5.
My python version is 2.5.1.
When I do python setup.py build, I get an error that looks like this:
File "/var/tmp/Python2.5.1/lib/python2.5/distutils/sysconfig.py", line
173, in customize_compiler
cc_cmd = cc + ' ' + cflags
TypeError: cannot concatenate 'str' and 'NoneType' objects
I poked around and I see this is the issue:
def customize_compiler(compiler):
"""Do any platform-specific customization of a CCompiler instance.
Mainly needed on Unix, so we can plug in the information that
varies across Unices and is stored in Python's Makefile.
"""
if compiler.compiler_type == "unix":
(cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
'CCSHARED', 'LDSHARED', 'SO')
Apparently get_config_vars() is returning a bunch of empty variables. Why?
I noticed the README file says: "The only requirements for installing the
package are Python 2.0 or later, and a C compiler."
I setenved CC to /usr/ucb/cc and got over this specific problem. But then
it started similarly complaining about CFLAGS, CCSHARED, LDSHARED, SO,
etc.
So what should these environment variables be set to so that I can get
this thing installed?

No comments:

Post a Comment