Add installable headers to configuration. Add the given sequence of files to the beginning of the headers list. By default, headers will be installed under / / directory. If an item of files is a tuple, then its first argum
(self,*files)
| 1383 | self.include_dirs.extend(include_dirs) |
| 1384 | |
| 1385 | def add_headers(self,*files): |
| 1386 | """Add installable headers to configuration. |
| 1387 | |
| 1388 | Add the given sequence of files to the beginning of the headers list. |
| 1389 | By default, headers will be installed under <python- |
| 1390 | include>/<self.name.replace('.','/')>/ directory. If an item of files |
| 1391 | is a tuple, then its first argument specifies the actual installation |
| 1392 | location relative to the <python-include> path. |
| 1393 | |
| 1394 | Parameters |
| 1395 | ---------- |
| 1396 | files : str or seq |
| 1397 | Argument(s) can be either: |
| 1398 | |
| 1399 | * 2-sequence (<includedir suffix>,<path to header file(s)>) |
| 1400 | * path(s) to header file(s) where python includedir suffix will |
| 1401 | default to package name. |
| 1402 | """ |
| 1403 | headers = [] |
| 1404 | for path in files: |
| 1405 | if is_string(path): |
| 1406 | [headers.append((self.name, p)) for p in self.paths(path)] |
| 1407 | else: |
| 1408 | if not isinstance(path, (tuple, list)) or len(path) != 2: |
| 1409 | raise TypeError(repr(path)) |
| 1410 | [headers.append((path[0], p)) for p in self.paths(path[1])] |
| 1411 | dist = self.get_distribution() |
| 1412 | if dist is not None: |
| 1413 | if dist.headers is None: |
| 1414 | dist.headers = [] |
| 1415 | dist.headers.extend(headers) |
| 1416 | else: |
| 1417 | self.headers.extend(headers) |
| 1418 | |
| 1419 | def paths(self,*paths,**kws): |
| 1420 | """Apply glob to paths and prepend local_path if needed. |
nothing calls this directly
no test coverage detected