diff options
author | Greg Ward <gward@python.net> | 2000-09-15 01:21:07 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-09-15 01:21:07 (GMT) |
commit | bbba66eb7d52c0f00b306009d37e8b488cdfe616 (patch) | |
tree | 8dcfaca9e9c6834ff89a863805cd0d2e436b51e1 /Lib/distutils | |
parent | 9bd3e9b6b260ac249024c426ec62133e05919f10 (diff) | |
download | cpython-bbba66eb7d52c0f00b306009d37e8b488cdfe616.zip cpython-bbba66eb7d52c0f00b306009d37e8b488cdfe616.tar.gz cpython-bbba66eb7d52c0f00b306009d37e8b488cdfe616.tar.bz2 |
Added 'warn_dir' option so other code can sneak in and disable
the sometimes inappropriate warning about where we're installing data files.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/install_data.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/distutils/command/install_data.py b/Lib/distutils/command/install_data.py index 6cfc7d4..af348f5 100644 --- a/Lib/distutils/command/install_data.py +++ b/Lib/distutils/command/install_data.py @@ -30,7 +30,9 @@ class install_data (Command): self.outfiles = [] self.root = None self.force = 0 + self.data_files = self.distribution.data_files + self.warn_dir = 1 def finalize_options (self): self.set_undefined_options('install', @@ -44,9 +46,10 @@ class install_data (Command): for f in self.data_files: if type(f) == StringType: # it's a simple file, so copy it - self.warn("setup script did not provide a directory for " - "'%s' -- installing right in '%s'" % - (f, self.install_dir)) + if self.warn_dir: + self.warn("setup script did not provide a directory for " + "'%s' -- installing right in '%s'" % + (f, self.install_dir)) out = self.copy_file(f, self.install_dir) self.outfiles.append(out) else: |