+++ /dev/null
-"""distutils.command.install_headers\r
-\r
-Implements the Distutils 'install_headers' command, to install C/C++ header\r
-files to the Python include directory."""\r
-\r
-__revision__ = "$Id$"\r
-\r
-from distutils.core import Command\r
-\r
-\r
-# XXX force is never used\r
-class install_headers(Command):\r
-\r
- description = "install C/C++ header files"\r
-\r
- user_options = [('install-dir=', 'd',\r
- "directory to install header files to"),\r
- ('force', 'f',\r
- "force installation (overwrite existing files)"),\r
- ]\r
-\r
- boolean_options = ['force']\r
-\r
- def initialize_options(self):\r
- self.install_dir = None\r
- self.force = 0\r
- self.outfiles = []\r
-\r
- def finalize_options(self):\r
- self.set_undefined_options('install',\r
- ('install_headers', 'install_dir'),\r
- ('force', 'force'))\r
-\r
-\r
- def run(self):\r
- headers = self.distribution.headers\r
- if not headers:\r
- return\r
-\r
- self.mkpath(self.install_dir)\r
- for header in headers:\r
- (out, _) = self.copy_file(header, self.install_dir)\r
- self.outfiles.append(out)\r
-\r
- def get_inputs(self):\r
- return self.distribution.headers or []\r
-\r
- def get_outputs(self):\r
- return self.outfiles\r
-\r
-# class install_headers\r