diff options
author | cookedm <cookedm@localhost> | 2007-05-25 11:20:02 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2007-05-25 11:20:02 +0000 |
commit | d11dbc78c0df5055a6ed57285775cc18dbe1721a (patch) | |
tree | 15623928349a868773695ff8cbdc3a5109086750 /numpy/distutils/ccompiler.py | |
parent | 9ddd860b31ea1d4517eb3fff6ab4c280ebb14dec (diff) | |
parent | 6ac33ee4e12b78b164a05046f7e029681f0e09a3 (diff) | |
download | numpy-d11dbc78c0df5055a6ed57285775cc18dbe1721a.tar.gz |
merge from distutils-revamp branch (step 1)
- minor cleanups
- find_executable returns None when no file found (instead of having to
check with os.path.isfile)
Diffstat (limited to 'numpy/distutils/ccompiler.py')
-rw-r--r-- | numpy/distutils/ccompiler.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py index b3c131316..bf077bacc 100644 --- a/numpy/distutils/ccompiler.py +++ b/numpy/distutils/ccompiler.py @@ -259,6 +259,8 @@ def CCompiler_get_version(self, force=0, ok_status=[0]): version_cmd = self.version_cmd except AttributeError: return None + if not version_cmd or not version_cmd[0]: + return None cmd = ' '.join(version_cmd) try: matcher = self.version_match @@ -278,9 +280,7 @@ def CCompiler_get_version(self, force=0, ok_status=[0]): version = None if status in ok_status: version = matcher(output) - if not version: - log.warn("Couldn't match compiler version for %r" % (output,)) - else: + if version: version = LooseVersion(version) self.version = version return version @@ -341,7 +341,8 @@ def new_compiler (plat=None, try: __import__ (module_name) except ImportError, msg: - print msg,'in numpy.distutils, trying from distutils..' + log.info('%s in numpy.distutils; trying from distutils', + str(msg)) module_name = module_name[6:] try: __import__(module_name) |