Support header sets
Just as it's useful to support multiple possible lib binaries (where the first one found is used), it would be useful to support multiple sets of headers. This is particularly useful when one vendor repackages another's software and renames the headers/libs, as in mabuchilab/Instrumental#26.
I think the most natural way to do this right now is to allow a tuple of "header dicts" under each platform, rather than only a single header dict. This would be less confusing than using nested tuples of header names within a single header dict, since there's less ordering ambiguity. This roughly mirrors how specifying multiple libs works, too. It also maps well onto the problem described above, where you will want to look within a separate list of directories, depending which vendor's software you have installed: i.e. you should only look for Thorlabs headers within its directories, and IDS headers within its directories.
Here's an example to demonstrate:
header_info = {
'win*': (
{
'path': ['vendor/one/path'],
'header': 'header_one.h'
},
{
'path': ['vendor/two/path'],
'header': 'header_two.h'
}
)
}
The basics were implemented in 84a16137d58, but there's more to do:
- Update the docs to reflect the changes, including example usage
- Should there be some way of indicating which header set was used to generate the bindings? This could be useful for switching what prefix gets used.