mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Added 'warn_dir' option so other code can sneak in and disable
the sometimes inappropriate warning about where we're installing data files.
This commit is contained in:
parent
9bd3e9b6b2
commit
bbba66eb7d
1 changed files with 6 additions and 3 deletions
|
|
@ -30,7 +30,9 @@ class install_data (Command):
|
||||||
self.outfiles = []
|
self.outfiles = []
|
||||||
self.root = None
|
self.root = None
|
||||||
self.force = 0
|
self.force = 0
|
||||||
|
|
||||||
self.data_files = self.distribution.data_files
|
self.data_files = self.distribution.data_files
|
||||||
|
self.warn_dir = 1
|
||||||
|
|
||||||
def finalize_options (self):
|
def finalize_options (self):
|
||||||
self.set_undefined_options('install',
|
self.set_undefined_options('install',
|
||||||
|
|
@ -44,9 +46,10 @@ class install_data (Command):
|
||||||
for f in self.data_files:
|
for f in self.data_files:
|
||||||
if type(f) == StringType:
|
if type(f) == StringType:
|
||||||
# it's a simple file, so copy it
|
# it's a simple file, so copy it
|
||||||
self.warn("setup script did not provide a directory for "
|
if self.warn_dir:
|
||||||
"'%s' -- installing right in '%s'" %
|
self.warn("setup script did not provide a directory for "
|
||||||
(f, self.install_dir))
|
"'%s' -- installing right in '%s'" %
|
||||||
|
(f, self.install_dir))
|
||||||
out = self.copy_file(f, self.install_dir)
|
out = self.copy_file(f, self.install_dir)
|
||||||
self.outfiles.append(out)
|
self.outfiles.append(out)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue