Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Enable windows/arm64 platform#22429
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this 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 while, please feel free to ping@matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
Why does ARM require freetype 2.11.0? I would quible a bit with the wording of "support", we have always supported newer versions of freetype (and the linux distributions regularly ship Matplotlib with newer versions), but due to changes in the text layout, many of our tests will fail if you do not user FT2.6.1. |
Freetype cannot be built for arm64 for earlier versions. MSBuild configurations were missing.
Yes, Freetype 2.11.0 seems to generate libraries in a slightly different place, and had to tweak the matplotlib scripts a bit to fix it. That's why I have used the wording supported :-) Happy to change it |
@tacaswell CI failures seem to be unrelated (looks like a known issue around ghost scripts based on the discussion on gitter). Could you review the patch please? |
lib/matplotlib/__init__.py Outdated
@@ -1199,7 +1200,9 @@ def is_interactive(): | |||
def _init_tests(): | |||
# The version of FreeType to install locally for running the | |||
# tests. This must match the value in `setupext.py` | |||
LOCAL_FREETYPE_VERSION = '2.6.1' | |||
win_arm64 = sys.platform.startswith('win') and \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you drop this change? Even if the default freetype we will try to build on arm64 in 2.11.1, it is still true that the tests will fail (due to changes in the font rendering) so we should still provide this warning.
I suspect that this (local) variable should have been calledVERSION_OF_FREETYPE_THE_TESTS_WORK_WITH
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes that make sense 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pushed a commit to revert that part.
Uh oh!
There was an error while loading.Please reload this page.
@QuLogic Any reason to not pull this back for 3.5.2? |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
- Add FreeType 2.11.1 support- Add MSBuild platform selection for ARM64- Add support for static builds for FreeType versions 2.10 and above
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
|
codecov can lag a bit based on when CI jobs finish. We need all of the jobs to get the full coverage, but codecov will update the issue when it gets most of them. |
What exactly is the failure? We don't use MSBuild to build bundled FreeType. |
Previous FreeType versions didn't have the ARM64 specific build configurations. Don't we use |
No, you're right, I forgot that happens on Windows. |
Can this be merged? |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
@nsait-linaro I do not fully understand what is going on at the bottom? It looks like it will grab the last path that last path that matches? Do we expect there to ever be more than one path that matches and/or can that path be directly constructed again? |
@tacaswell There should be only one match as we are building only specific platform at a time. I have done a bit of refactoring to reflect that. |
msbuild_platform = ( | ||
'x64' if platform.architecture()[0] == '64bit' else 'Win32') | ||
base_path = Path("build/freetype-2.6.1/builds/windows") | ||
is_x64 = platform.architecture()[0] == '64bit' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is much clearer 👍🏻
Thank you @nsait-linaro ! I'll merge this as soon as CI finishes. |
@QuLogic do you have any idea what is going on with the flake8 linter? |
Is the 79 character limit per line intentional? I think changes used to pass CI before so I guess a new restriction. |
Yes and this has been our standard for longer than I have been with the project. |
OK. Fixed that. Good to go |
Thank you @nsait-linaro ! Congratulations on what I think is your first merged Matplotlib PR 🎉 Hopefully we will hear from you again. |
Thanks@tacaswell ! |
…429-on-v3.5.xBackport PR#22429 on branch v3.5.x (Enable windows/arm64 platform)
Uh oh!
There was an error while loading.Please reload this page.
The patch adds support for building matplotlib for windows on arm64 platforms with FreeType 2.11.
Few tests fail on windows on arm target due to minor mismatches in reference images used for the test. This seems to be due to the FreeType version upgrade required for win/arm64 platform. Similar tests are failing for win/x64 as well with the latest FreeType. Reference images probably need to be upgraded with the latest FreeType for all of them to pass correctly.
PR Summary
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).