summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/install_data.py10
-rw-r--r--Lib/distutils/command/install_headers.py10
2 files changed, 15 insertions, 5 deletions
diff --git a/Lib/distutils/command/install_data.py b/Lib/distutils/command/install_data.py
index 5481dab..f8ed0a7 100644
--- a/Lib/distutils/command/install_data.py
+++ b/Lib/distutils/command/install_data.py
@@ -25,7 +25,7 @@ class install_data (Command):
def initialize_options (self):
self.install_dir = None
- self.outfiles = None
+ self.outfiles = []
self.root = None
self.data_files = self.distribution.data_files
@@ -40,7 +40,8 @@ class install_data (Command):
for f in self.data_files:
if type(f) == StringType:
# its a simple file, so copy it
- self.copy_file(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
dir = f[0]
@@ -50,10 +51,11 @@ class install_data (Command):
dir = change_root(self.root, dir)
self.mkpath(dir)
for data in f[1]:
- self.copy_file(data, dir)
+ out = self.copy_file(data, dir)
+ self.outfiles.append(out)
def get_inputs (self):
return self.data_files or []
def get_outputs (self):
- return self.outfiles or []
+ return self.outfiles
diff --git a/Lib/distutils/command/install_headers.py b/Lib/distutils/command/install_headers.py
index 33edb94..afcc887 100644
--- a/Lib/distutils/command/install_headers.py
+++ b/Lib/distutils/command/install_headers.py
@@ -7,6 +7,7 @@ files to the Python include directory."""
__revision__ = "$Id$"
+import os
from distutils.core import Command
@@ -21,6 +22,7 @@ class install_headers (Command):
def initialize_options (self):
self.install_dir = None
+ self.outfiles = []
def finalize_options (self):
self.set_undefined_options('install',
@@ -33,8 +35,14 @@ class install_headers (Command):
self.mkpath(self.install_dir)
for header in headers:
- self.copy_file(header, self.install_dir)
+ out = self.copy_file(header, self.install_dir)
+ self.outfiles.append(out)
+ def get_inputs (self):
+ return self.distribution.headers or []
+
+ def get_outputs (self):
+ return self.outfiles
# run()
# class install_headers