Skip to content

Commit bbba66e

Browse files
committed
Added 'warn_dir' option so other code can sneak in and disable
the sometimes inappropriate warning about where we're installing data files.
1 parent 9bd3e9b commit bbba66e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎Lib/distutils/command/install_data.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def initialize_options (self):
3030
self.outfiles = []
3131
self.root = None
3232
self.force = 0
33+
3334
self.data_files = self.distribution.data_files
35+
self.warn_dir = 1
3436

3537
def finalize_options (self):
3638
self.set_undefined_options('install',
@@ -44,9 +46,10 @@ def run (self):
4446
for f in self.data_files:
4547
if type(f) == StringType:
4648
# it's a simple file, so copy it
47-
self.warn("setup script did not provide a directory for "
48-
"'%s' -- installing right in '%s'" %
49-
(f, self.install_dir))
49+
if self.warn_dir:
50+
self.warn("setup script did not provide a directory for "
51+
"'%s' -- installing right in '%s'" %
52+
(f, self.install_dir))
5053
out = self.copy_file(f, self.install_dir)
5154
self.outfiles.append(out)
5255
else:

0 commit comments

Comments
 (0)