Find all the headers used by a group of cfiles. We do this by just regexping the source, which is a bit simpler than properly plumbing the data through. Arguments: cfiles: A list of (file name, file contents) pairs.
(cfiles: list[tuple[str, str]])
| 567 | |
| 568 | |
| 569 | def get_header_deps(cfiles: list[tuple[str, str]]) -> list[str]: |
| 570 | """Find all the headers used by a group of cfiles. |
| 571 | |
| 572 | We do this by just regexping the source, which is a bit simpler than |
| 573 | properly plumbing the data through. |
| 574 | |
| 575 | Arguments: |
| 576 | cfiles: A list of (file name, file contents) pairs. |
| 577 | """ |
| 578 | headers: set[str] = set() |
| 579 | for _, contents in cfiles: |
| 580 | headers.update(re.findall(r'#include [<"]([^>"]+)[>"]', contents)) |
| 581 | |
| 582 | return sorted(headers) |
| 583 | |
| 584 | |
| 585 | def mypyc_build( |
no test coverage detected
searching dependent graphs…