diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-28 03:59:59 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-28 03:59:59 +0000 |
commit | 1bb62100df7ab50cee97d607d497147e0e416cea (patch) | |
tree | a26c08ecc33b5341497f8fe5458fc0d92f9517b6 /numpy/distutils/system_info.py | |
parent | 006cee584e54c3cfe68ad018bb71cba3d3ec614e (diff) | |
download | numpy-1bb62100df7ab50cee97d607d497147e0e416cea.tar.gz |
Add NPY_MAXARGS to arrayobject.h for Multi-iterator object. Don't fail if get_atlas_version can't execute the code.
Diffstat (limited to 'numpy/distutils/system_info.py')
-rw-r--r-- | numpy/distutils/system_info.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 08ada4783..cd4c2996e 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -1086,10 +1086,25 @@ def get_atlas_version(**config): if _cached_atlas_version.has_key(key): return _cached_atlas_version[key] c = cmd_config(Distribution()) - s, o = c.get_output(atlas_version_c_text, - libraries=libraries, library_dirs=library_dirs) + atlas_version = None + + try: + s, o = c.get_output(atlas_version_c_text, + libraries=libraries, library_dirs=library_dirs) + except: # failed to get version from file -- maybe on Windows + # look at directory name + for o in library_dirs: + m = re.search(r'ATLAS_(?P<version>\d+[.]\d+[.]\d+)_',o) + if m: + atlas_version = m.group('version') + if atlas_version is not None: + break + # final choice --- look at ATLAS_VERSION environment + # variable + if altas_version is None: + altas_version = os.environ.get('ATLAS_VERSION',None) + return atlas_version or '?.?.?' - atlas_version = None if not s: m = re.search(r'ATLAS version (?P<version>\d+[.]\d+[.]\d+)',o) if m: |