diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2022-06-12 18:05:03 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-06-12 18:05:03 -0400 |
| commit | 423f1829b5e8b2213492e4f023f26a7c26f0b287 (patch) | |
| tree | 14a73d41f42c5d3a3effce1dd47ee3af3c07d689 /setuptools/_distutils/command/install_data.py | |
| parent | 48adabe567806c808fdede5afc8c57f68c4f9755 (diff) | |
| parent | 75ed79d1ad1bfbb30dd684cd3cc55cb1139dc31b (diff) | |
| download | python-setuptools-git-423f1829b5e8b2213492e4f023f26a7c26f0b287.tar.gz | |
Merge pypa/distutils@75ed79d
Diffstat (limited to 'setuptools/_distutils/command/install_data.py')
| -rw-r--r-- | setuptools/_distutils/command/install_data.py | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/setuptools/_distutils/command/install_data.py b/setuptools/_distutils/command/install_data.py index 947cd76a..23d91ade 100644 --- a/setuptools/_distutils/command/install_data.py +++ b/setuptools/_distutils/command/install_data.py @@ -9,18 +9,21 @@ import os from distutils.core import Command from distutils.util import change_root, convert_path + class install_data(Command): description = "install data files" user_options = [ - ('install-dir=', 'd', - "base directory for installing data files " - "(default: installation base dir)"), - ('root=', None, - "install everything relative to this alternate root directory"), + ( + 'install-dir=', + 'd', + "base directory for installing data files " + "(default: installation base dir)", + ), + ('root=', None, "install everything relative to this alternate root directory"), ('force', 'f', "force installation (overwrite existing files)"), - ] + ] boolean_options = ['force'] @@ -33,11 +36,12 @@ class install_data(Command): self.warn_dir = 1 def finalize_options(self): - self.set_undefined_options('install', - ('install_data', 'install_dir'), - ('root', 'root'), - ('force', 'force'), - ) + self.set_undefined_options( + 'install', + ('install_data', 'install_dir'), + ('root', 'root'), + ('force', 'force'), + ) def run(self): self.mkpath(self.install_dir) @@ -46,9 +50,10 @@ class install_data(Command): # it's a simple file, so copy it f = convert_path(f) if self.warn_dir: - self.warn("setup script did not provide a directory for " - "'%s' -- installing right in '%s'" % - (f, self.install_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: |
