diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2006-03-30 09:21:33 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2006-03-30 09:21:33 +0000 |
commit | 1845b35c086f01bec62097ef3ec03dad8646d6b6 (patch) | |
tree | af73cb7191938ecc41430f29a2948dfef0ee2d3f /numpy/_import_tools.py | |
parent | a873580ec504bee32ab45556d4083873de9d4918 (diff) | |
download | numpy-1845b35c086f01bec62097ef3ec03dad8646d6b6.tar.gz |
Trying harder to find info modules.
Diffstat (limited to 'numpy/_import_tools.py')
-rw-r--r-- | numpy/_import_tools.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/numpy/_import_tools.py b/numpy/_import_tools.py index 2155dc4bd..be4852c72 100644 --- a/numpy/_import_tools.py +++ b/numpy/_import_tools.py @@ -50,6 +50,8 @@ class PackageLoader: """ import imp info_files = [] + info_modules = self.info_modules + if packages is None: for path in self.parent_path: info_files.extend(self._get_info_files('*',path)) @@ -62,10 +64,14 @@ class PackageLoader: info_files.extend(names_files) break else: - self.warn('No scipy-style subpackage %r found in %s. Ignoring.'\ - % (package_name,':'.join(self.parent_path))) + try: + exec 'import %s.info as info' % (package_name) + info_modules[package_name] = info + except ImportError, msg: + self.warn('No scipy-style subpackage %r found in %s. '\ + 'Ignoring: %s'\ + % (package_name,':'.join(self.parent_path), msg)) - info_modules = self.info_modules for package_name,info_file in info_files: if info_modules.has_key(package_name): continue |