Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
tacaswell merged 13 commits intomatplotlib:mainfromniyas-sait:windows-arm64
Mar 14, 2022
Merged

Conversation

niyas-sait
Copy link
Contributor

@niyas-saitniyas-sait commentedFeb 8, 2022
edited
Loading

The patch adds support for building matplotlib for windows on arm64 platforms with FreeType 2.11.

  • Changes to compile with FreeType 2.11.1
  • Add MSBuild platform selection for ARM64
  • Add support for static builds for FreeType versions 2.10 and above

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

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).

Copy link

@github-actionsgithub-actionsbot 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 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.

@tacaswell
Copy link
Member

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.

@niyas-sait
Copy link
ContributorAuthor

Why does ARM require freetype 2.11.0?

Freetype cannot be built for arm64 for earlier versions. MSBuild configurations were missing.

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.

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

@niyas-sait
Copy link
ContributorAuthor

@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?

@@ -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 \
Copy link
Member

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 ;)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yes that make sense 👍

Copy link
ContributorAuthor

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.

@oscargusoscargus added status: needs workflow approvalFor PRs from new contributors, from which GitHub blocks workflows by default. OS: Microsoft labelsFeb 17, 2022
@tacaswelltacaswell added this to thev3.5.2 milestoneFeb 18, 2022
@tacaswell
Copy link
Member

@QuLogic Any reason to not pull this back for 3.5.2?

@niyas-sait
Copy link
ContributorAuthor

codecov tests don't seem happy now! It is not flagging any particular lines. Could it be a rebase issue?

@tacaswell
Copy link
Member

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.

@QuLogic
Copy link
Member

Freetype cannot be built for arm64 for earlier versions. MSBuild configurations were missing.

What exactly is the failure? We don't use MSBuild to build bundled FreeType.

@niyas-sait
Copy link
ContributorAuthor

Freetype cannot be built for arm64 for earlier versions. MSBuild configurations were missing.

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 usefreetype.sln to build FreeType as part of building extensions ? (ref:setupext.py, line 594, do_custom_build)

@QuLogic
Copy link
Member

No, you're right, I forgot that happens on Windows.

@niyas-sait
Copy link
ContributorAuthor

Can this be merged?

@tacaswell
Copy link
Member

@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?

@niyas-sait
Copy link
ContributorAuthor

@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'
Copy link
Member

Choose a reason for hiding this comment

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

This is much clearer 👍🏻

@tacaswell
Copy link
Member

Thank you @nsait-linaro !

I'll merge this as soon as CI finishes.

@tacaswell
Copy link
Member

@QuLogic do you have any idea what is going on with the flake8 linter?

@niyas-sait
Copy link
ContributorAuthor

@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.

@tacaswell
Copy link
Member

Is the 79 character limit per line intentional?

Yes and this has been our standard for longer than I have been with the project.

@niyas-sait
Copy link
ContributorAuthor

Is the 79 character limit per line intentional?

Yes and this has been our standard for longer than I have been with the project.

OK. Fixed that. Good to go

@tacaswelltacaswell merged commitd7828f3 intomatplotlib:mainMar 14, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 14, 2022
@tacaswell
Copy link
Member

Thank you @nsait-linaro !

Congratulations on what I think is your first merged Matplotlib PR 🎉 Hopefully we will hear from you again.

@niyas-sait
Copy link
ContributorAuthor

Thank you @nsait-linaro !

Congratulations on what I think is your first merged Matplotlib PR 🎉 Hopefully we will hear from you again.

Thanks@tacaswell !

QuLogic pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMar 16, 2022
tacaswell added a commit that referenced this pull requestMar 17, 2022
…429-on-v3.5.xBackport PR#22429 on branch v3.5.x (Enable windows/arm64 platform)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer left review comments

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@tacaswelltacaswelltacaswell approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Labels
OS: Microsoftstatus: needs workflow approvalFor PRs from new contributors, from which GitHub blocks workflows by default.
Projects
None yet
Milestone
v3.5.2
Development

Successfully merging this pull request may close these issues.

5 participants
@niyas-sait@tacaswell@oscargus@QuLogic@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp