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

Use set_source_pkgconfig instead of set_source #991

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sean-Der
Copy link

@Sean-Der Sean-Der commented Nov 27, 2023

I don't fully understanding how Python does FFI, but I don't understand how it would work before.

Now it uses pkg-config and will pull the header locations properly.

@jlaine
Copy link
Collaborator

jlaine commented Nov 30, 2023

Hi @Sean-Der thanks for the PR! Let's let CI run to see how it turns out. I'm a little doubtful this will work on Windows?

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cdba00d) 100.00% compared to head (b9da858) 100.00%.
Report is 16 commits behind head on main.

❗ Current head b9da858 differs from pull request most recent head 936bd67. Consider uploading reports for the commit 936bd67 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #991   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines         5816      5839   +23     
=========================================
+ Hits          5816      5839   +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sean-Der
Copy link
Author

@jlaine thanks!

Should I put this behind a platform check? I don’t understand how it works today on Mac/Linux. If those headers aren’t in /usr/include how does it find it?

I needed this change to build on NixOS and my Mac.

If pkg-config fails (e.g. on Windows), fallback to trying to use
standard include and library paths.

Co-authored-by: Jeremy Lainé <jeremy.laine@m4x.org>
@jlaine
Copy link
Collaborator

jlaine commented Jan 25, 2024

@Sean-Der I've taken a slightly different approach of trying pkg-config first and falling back to our previous logic if that fails. Could you let me know if it works for you?

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

Successfully merging this pull request may close these issues.

None yet

2 participants