[Distutils] numpy build fails in distutils code

Jay Parlar parlar at gmail.com
Sat Oct 14 19:24:11 CEST 2006


On 10/14/06, Phillip J. Eby <pje at telecommunity.com> wrote:
> At 11:10 AM 10/14/2006 -0400, Jay Parlar wrote:
> >I've tried asking this on the numpy list (a few times), but
> >unfortunately no response. Since the error *appears* to be inside
> >distutils, I thought maybe someone here would recognize it.
>
> Nope, it's a numpy.distutils error; notice that the bottom of the traceback
> is all from numpy code.  Distutils also has no "config" command, so that
> bit's coming from numpy.distutils also.
>
>

Yeah, the exception is generated in numpy code, but the reason the
exception is being raised is because of the 'if not result' check.

The 'result' variable gets its value assigned by the
config_cmd.try_run() method, which comes from distutils.

The relevant numpy code that creates the 'config_cmd' object is:

def get_cmd(cmdname, _cache={}):
    if not _cache.has_key(cmdname):
        import distutils.core
        dist = distutils.core._setup_distribution
        if dist is None:
            from distutils.errors import DistutilsInternalError
            raise DistutilsInternalError(
                  'setup distribution instance not initialized')
        cmd = dist.get_command_obj(cmdname)
        _cache[cmdname] = cmd
    return _cache[cmdname]


Could it be that the Python 2.5 universal binary is compiled with a
different version of gcc? Would that cause an error? My gcc is 3.3,
but if the 2.5 binary was built on OS X Tiger, then the gcc was
probably 4.0. Would distutils look at that when trying to build code?

Jay P.


More information about the Distutils-SIG mailing list