diff options
| author | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 15:39:34 +0100 |
|---|---|---|
| committer | FELD Boris <lothiraldan@gmail.com> | 2011-01-29 15:39:34 +0100 |
| commit | de90c183d8269238e9d9b1dacc2feb435dceda7b (patch) | |
| tree | c282a64f75f2cd1b317c0e01c37249da3913ea00 /distutils2/command/install_data.py | |
| parent | e33e323e3c24ac46e5a4da7a62d1c2e83192b078 (diff) | |
| download | disutils2-de90c183d8269238e9d9b1dacc2feb435dceda7b.tar.gz | |
Use public method from sysconfig instead of private one to expand paths. Correct a type in config module.
Diffstat (limited to 'distutils2/command/install_data.py')
| -rw-r--r-- | distutils2/command/install_data.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/distutils2/command/install_data.py b/distutils2/command/install_data.py index 6fe3805..59d020a 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 _expand_vars, _subst_vars, get_paths +from distutils2._backport.sysconfig import get_paths class install_data(Command): @@ -55,8 +55,8 @@ 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 = _subst_vars(path_with_categories, local_vars) - expanded_path = _subst_vars(expanded_path, local_vars) + expanded_path = get_paths(path_with_categories, local_vars) + expanded_path = get_paths(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) @@ -66,7 +66,7 @@ class install_data(Command): sources = [] for file in self.data_files: destination = convert_path(self.expand_categories(file[1])) - if os.path.file(destination): + if os.path.isfile(destination): sources.append(destination) return sources |
