Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/distutils/command/install_headers.py @ 87:2a2c65a20a8b
Add Python libs and headers
author | Chris Cannam |
---|---|
date | Wed, 25 Feb 2015 14:05:22 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
86:413a9d26189e | 87:2a2c65a20a8b |
---|---|
1 from __future__ import division, absolute_import, print_function | |
2 | |
3 import os | |
4 from distutils.command.install_headers import install_headers as old_install_headers | |
5 | |
6 class install_headers (old_install_headers): | |
7 | |
8 def run (self): | |
9 headers = self.distribution.headers | |
10 if not headers: | |
11 return | |
12 | |
13 prefix = os.path.dirname(self.install_dir) | |
14 for header in headers: | |
15 if isinstance(header, tuple): | |
16 # Kind of a hack, but I don't know where else to change this... | |
17 if header[0] == 'numpy.core': | |
18 header = ('numpy', header[1]) | |
19 if os.path.splitext(header[1])[1] == '.inc': | |
20 continue | |
21 d = os.path.join(*([prefix]+header[0].split('.'))) | |
22 header = header[1] | |
23 else: | |
24 d = self.install_dir | |
25 self.mkpath(d) | |
26 (out, _) = self.copy_file(header, d) | |
27 self.outfiles.append(out) |