mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Print a warning if we install a data file right in install_dir.
Tweaked help text.
This commit is contained in:
parent
fa2f4b6d8e
commit
c3f364462f
1 changed files with 7 additions and 3 deletions
|
@ -18,7 +18,8 @@ class install_data (Command):
|
|||
|
||||
user_options = [
|
||||
('install-dir=', 'd',
|
||||
"directory to install the files to"),
|
||||
"base directory for installating data files "
|
||||
"(default: installation base dir)"),
|
||||
('root=', None,
|
||||
"install everything relative to this alternate root directory"),
|
||||
]
|
||||
|
@ -39,11 +40,14 @@ class install_data (Command):
|
|||
self.mkpath(self.install_dir)
|
||||
for f in self.data_files:
|
||||
if type(f) == StringType:
|
||||
# its a simple file, so copy it
|
||||
# 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))
|
||||
out = self.copy_file(f, self.install_dir)
|
||||
self.outfiles.append(out)
|
||||
else:
|
||||
# its a tuple with path to install to and a list of files
|
||||
# it's a tuple with path to install to and a list of files
|
||||
dir = f[0]
|
||||
if not os.path.isabs(dir):
|
||||
dir = os.path.join(self.install_dir, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue