Skip to content

setupext: support using environment variables for dependencies#26679

Closed
mathstuf wants to merge 1 commit into
matplotlib:mainfrom
mathstuf:deps-by-env
Closed

setupext: support using environment variables for dependencies#26679
mathstuf wants to merge 1 commit into
matplotlib:mainfrom
mathstuf:deps-by-env

Conversation

@mathstuf

@mathstuf mathstuf commented Sep 1, 2023

Copy link
Copy Markdown

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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

mathstuf commented Sep 3, 2023

Copy link
Copy Markdown
Author

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
Copy Markdown
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

mathstuf commented Sep 4, 2023

Copy link
Copy Markdown
Author

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

ksunden commented Sep 4, 2023

Copy link
Copy Markdown
Member

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

mathstuf commented Sep 4, 2023

Copy link
Copy Markdown
Author

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
Copy Markdown
Author

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

@mathstuf mathstuf closed this Oct 12, 2023
@QuLogic

QuLogic commented Oct 12, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown
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