Skip to content

setupext: support using environment variables for dependencies #26679

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

Closed
wants to merge 1 commit into from

Conversation

mathstuf
Copy link

@mathstuf mathstuf commented Sep 1, 2023

PR summary

On Windows, without Conda or the libraries being in default locations, matplotlib has problems finding freetype and qhull. Add ultimate fallback solutions using very specific environment variables named {FREETYPE,QHULL}_{INCLUDE,LIBRARY}_DIRS.


My attempts at using CL and LINK were failing; not sure if the migration to meson made these obsolete or not.

PR checklist

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@mathstuf
Copy link
Author

mathstuf commented Sep 3, 2023

FWIW, before I go and write docs for this, I'd like to know that it's a suitable solution to the problem. If needed, the QHULL_* variables can be additionally guarded behind a Windows check.

@melissawm
Copy link
Member

Looks like there are some related failures in CI - @mathstuf would you take a look? Let us know if you need help. Thanks!

On Windows, without Conda or the libraries being in default locations,
matplotlib has problems finding freetype and qhull. Add ultimate
fallback solutions using very specific environment variables named
`{FREETYPE,QHULL}_{INCLUDE,LIBRARY}_DIRS`.
@mathstuf
Copy link
Author

mathstuf commented Sep 4, 2023

Whoops, indeed. I had typos and copy pasta that I had fixed in testing but had inconsistently applied back to my development machine. Applied here too now.

@story645 story645 requested a review from QuLogic September 4, 2023 18:14
@ksunden
Copy link
Member

ksunden commented Sep 4, 2023

I'll ping in @QuLogic here... We are in the process of moving the build system to meson (see #26621)

That PR gets rid of the setupext.py file entirely, rather relying on meson build files.

@mathstuf
Copy link
Author

mathstuf commented Sep 4, 2023

That would be suitable to me if meson can reliably find these dependencies on Windows then. It seems for .pc to be reliable I have to go chase down if (NOT WIN32) guarding conditions on the .pc file generation/installation in some projects (libpng for example).

@mathstuf
Copy link
Author

Seems to be obsolete since #26621 removed setupext.py.

@mathstuf mathstuf closed this Oct 12, 2023
@QuLogic
Copy link
Member

QuLogic commented Oct 12, 2023

That would be suitable to me if meson can reliably find these dependencies on Windows then. It seems for .pc to be reliable I have to go chase down if (NOT WIN32) guarding conditions on the .pc file generation/installation in some projects (libpng for example).

It should be; we don't have any platform-specific checks for dependencies, just the standard dependency or fallback to find_library. Please open a new bug if that remains an issue.

@mathstuf
Copy link
Author

Will know the next time we go and bump packages. Thanks :) .

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

Successfully merging this pull request may close these issues.

4 participants