summaryrefslogtreecommitdiff
path: root/scipy/distutils/command/install_headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'scipy/distutils/command/install_headers.py')
-rw-r--r--scipy/distutils/command/install_headers.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/scipy/distutils/command/install_headers.py b/scipy/distutils/command/install_headers.py
new file mode 100644
index 000000000..801c1a9d9
--- /dev/null
+++ b/scipy/distutils/command/install_headers.py
@@ -0,0 +1,21 @@
+import os
+from distutils.command.install import *
+from distutils.command.install_headers import install_headers as old_install_headers
+
+class install_headers (old_install_headers):
+
+ def run (self):
+ headers = self.distribution.headers
+ if not headers:
+ return
+
+ prefix = os.path.dirname(self.install_dir)
+ for header in headers:
+ if isinstance(header,tuple):
+ d = os.path.join(*([prefix]+header[0].split('.')))
+ header = header[1]
+ else:
+ d = self.install_dir
+ self.mkpath(d)
+ (out, _) = self.copy_file(header, d)
+ self.outfiles.append(out)