diff options
| author | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 16:47:23 +0100 |
|---|---|---|
| committer | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 16:47:23 +0100 |
| commit | c19d455ade483a0487ecf97264f078c0d147f95a (patch) | |
| tree | d9f2f8d832237b9ff6b072c1bbf5d89dc7a7b617 /distutils2/command/install_data.py | |
| parent | 0f684027cdf4b5cb58735ff17fdca9d30640d342 (diff) | |
| download | disutils2-c19d455ade483a0487ecf97264f078c0d147f95a.tar.gz | |
Correct typo error in RESOURCE paths mapping file in pkgutil.
Add a format_value function in sysconfig.
Correct bug in get_source_files in install_data.
Diffstat (limited to 'distutils2/command/install_data.py')
| -rw-r--r-- | distutils2/command/install_data.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/distutils2/command/install_data.py b/distutils2/command/install_data.py index 59d020a..59cf90e 100644 --- a/distutils2/command/install_data.py +++ b/distutils2/command/install_data.py @@ -9,7 +9,7 @@ platform-independent data files.""" import os from distutils2.command.cmd import Command from distutils2.util import change_root, convert_path -from distutils2._backport.sysconfig import get_paths +from distutils2._backport.sysconfig import get_paths, format_value class install_data(Command): @@ -55,20 +55,15 @@ class install_data(Command): def expand_categories(self, path_with_categories): local_vars = get_paths() local_vars['distribution.name'] = self.distribution.metadata['Name'] - expanded_path = get_paths(path_with_categories, local_vars) - expanded_path = get_paths(expanded_path, local_vars) + expanded_path = format_value(path_with_categories, local_vars) + expanded_path = format_value(expanded_path, local_vars) if '{' in expanded_path and '}' in expanded_path: self.warn("Unable to expand %s, some categories may missing." % path_with_categories) return expanded_path def get_source_files(self): - sources = [] - for file in self.data_files: - destination = convert_path(self.expand_categories(file[1])) - if os.path.isfile(destination): - sources.append(destination) - return sources + return self.data_files.keys() def get_inputs(self): return self.data_files or [] |
