Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support header sets #3

Open
natezb opened this issue May 30, 2017 · 1 comment
Open

Support header sets #3

natezb opened this issue May 30, 2017 · 1 comment

Comments

@natezb
Copy link
Collaborator

natezb commented May 30, 2017

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'
        }
    )
}
@natezb
Copy link
Collaborator Author

natezb commented Aug 14, 2017

The basics were implemented in 84a1613, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant