diff options
| author | David Cournapeau <cournape@gmail.com> | 2009-07-26 11:18:25 +0000 |
|---|---|---|
| committer | David Cournapeau <cournape@gmail.com> | 2009-07-26 11:18:25 +0000 |
| commit | ab6878ee613fa348ee1ca59dcb77d44a221d06a3 (patch) | |
| tree | 690eae69878b6b501a00a2884ed1a8db1150cf7b /numpy/distutils/npy_pkg_config.py | |
| parent | 50d010c72dc3649cecf247cc637458ba98a15f2a (diff) | |
| download | numpy-ab6878ee613fa348ee1ca59dcb77d44a221d06a3.tar.gz | |
Fix get_config.
Diffstat (limited to 'numpy/distutils/npy_pkg_config.py')
| -rw-r--r-- | numpy/distutils/npy_pkg_config.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/distutils/npy_pkg_config.py b/numpy/distutils/npy_pkg_config.py index 2e4585e06..616fdaddb 100644 --- a/numpy/distutils/npy_pkg_config.py +++ b/numpy/distutils/npy_pkg_config.py @@ -4,7 +4,7 @@ import os import shlex __all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSet', - 'get_info', 'parse_flags'] + 'read_config', 'parse_flags'] _VAR = re.compile('\$\{([a-zA-Z0-9_-]+)\}') @@ -200,7 +200,7 @@ def parse_config(filename, dirs=None): return meta, vars, sections, requires -def read_config(filenames, dirs=None): +def _read_config_imp(filenames, dirs=None): def _read_config(f): meta, vars, sections, reqs = parse_config(f, dirs) # recursively add sections and variables of required libraries @@ -228,11 +228,11 @@ def read_config(filenames, dirs=None): # be parsed many time outside LibraryInfo creation, but I doubt this will be a # problem in practice _CACHE = {} -def get_info(pkgname, dirs=None): +def read_config(pkgname, dirs=None): try: return _CACHE[pkgname] except KeyError: - v = read_config(pkg_to_filename(pkgname), dirs) + v = _read_config_imp(pkg_to_filename(pkgname), dirs) _CACHE[pkgname] = v return v @@ -277,9 +277,9 @@ if __name__ == '__main__': import os d = os.environ.get('NPY_PKG_CONFIG_PATH') if d: - info = get_info(pkg_name, ['numpy/distutils', '.', d]) + info = read_info(pkg_name, ['numpy/core/lib/npy-pkg-config', '.', d]) else: - info = get_info(pkg_name, ['numpy/distutils', '.']) + info = read_info(pkg_name, ['numpy/core/lib/npy-pkg-config', '.']) if options.section: section = options.section |
