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

configure_extension doesn't handle packages with version specified #65

Open
Youw opened this issue Nov 12, 2023 · 0 comments
Open

configure_extension doesn't handle packages with version specified #65

Youw opened this issue Nov 12, 2023 · 0 comments

Comments

@Youw
Copy link

Youw commented Nov 12, 2023

When using libs or cflags functions like:

pkgconfig.cflags('libusb-1.0 >= 1.0.9')

The package with version is handled correctly.

But if I try to use it with configure_extension:

pkgconfig.configure_extension(hid, 'libusb-1.0 >= 1.0.9')

due to split being used to handle multiple packages - it is incorrectly being threated as 3 different packages: libusb-1.0, >= and 1.0.9. (Naturally if fails to find the >= package).

Avoiding spaces is not an option as it is an invalid pkg-config syntax.


The ultimate fix would be to use list of strings as an argument, instead of a single string, where each element of a list is a single package to be an argument to pkg-config (to be quoted with ' before passing to pkg-config commend), but that would break API/backward-compatibility.


My workaround is to re-implement my own copy of configure_extension.
Don't see a feasible workaround for now, as pkgconfig doesn't allow passing extra options, like --msvc-syntax (#38).
Probably just going to lose the version information, which is unfortunate.
Had make my own implementation instead of using pkgconfig package to preserve the version requirement.

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