GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BLD: vendor meson-python to make the Windows builds with SIMD work by rgommers · Pull Request #24396 · numpy/numpy

Conversation

@rgommers

@rgommers rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member

Follow-up to gh-24379. See the end of that PR for discussion on why that PR alone was not enough on Windows.

Tested together with SIMD support in gh-24395, and looks good. I plan to merge this asap and then rebase gh-23096 on top.

This also cleans up the Windows GHA CI jobs, they were pretty messy. meson as a standalone executable command cannot be used anymore as long as we vendor it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
rgommers added 3 commits August 11, 2023 15:55
@rgommers
BLD: use numpy's friendly fork of meson-python
942fb8c
@rgommers
DEV: vendor spin's meson.py, modified to use our vendored Meson
2ecc508
Note that this is a bit messy. I tried to vendor spin's `meson.py`
separately, but it's not possible to do so cleanly as far as I can
tell. The import machinery is unhappy bouncing around between
`bin/spin`, `.spin/cmds.py and `.spin/meson.py`. So it was either
folding the `spin/cmds/meson.py` content all into cmds.py, or vendor all
of the spin package. This seems to work.
@rgommers
CI: fix Windows GHA jobs for vendored meson-python and spin
d675fcc
@rgommers rgommers added component: build component: CI Meson Items related to the introduction of Meson as the new build system for NumPy labels Aug 11, 2023
@rgommers rgommers added this to the 2.0.0 release milestone Aug 11, 2023
@rgommers rgommers added the 09 - Backport-Candidate PRs tagged should be backported label Aug 11, 2023
@github-actions github-actions Bot added the 36 - Build Build related PR label Aug 11, 2023
@rgommers

rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member Author

This is good to go. @charris, @mattip, @seberg, or @stefanv anyone want to have a look, or give a thumbs up here to merge? I'd like to get things unblocked for the 1.26.0 pre-release ideally by the end of today.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@charris

charris commented Aug 11, 2023

Copy link
Copy Markdown
Member

LGTM. It will help with the backports if they are done in the correct order, so having that documented somewhere is desirable. Will all the linked OpenBLAS libraries all be 32 bits?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rgommers

rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member Author

LGTM. It will help with the backports if they are done in the correct order, so having that documented somewhere is desirable.

Thanks for having a look. And sure, I will post a comment with an ordered list once we're ready to do them all.

Will all the linked OpenBLAS libraries all be 32 bits?

No, that's just for these couple of jobs here I think. All the wheel builds are using 64-bit OpenBLAS, so there is no change compared to 1.25.0 I believe.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rgommers
rgommers merged commit 5697016 into numpy:main Aug 11, 2023
@rgommers
rgommers deleted the vendored-mesonpython branch August 11, 2023 15:39
@rgommers

rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member Author

In it goes then. On to gh-23096

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanv

stefanv commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

This went in less than an hour after I was pinged to review, so unfortunately I didn't have time to give feedback. I think vendoring the whole of spin is almost certainly the wrong way to go, since it vastly complicates maintaining what is supposed to be a lean cmds.py.

I'll see what I can do to clear things up in a follow-up PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanv

stefanv commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

Just to understand the context here, why are we vendoring meson instead of installing it from, e.g., github?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rgommers

rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member Author

I think vendoring the whole of spin is almost certainly the wrong way to go

I'm pretty sure that it is not. I burned 1.5 days on suggestions to avoid it, without success. The problem is that both meson-python and spin call subproces.run(['meson', ...]) and that will not work on Windows with the vendored Meson we now have. See #24379 (comment) and following comments.

Just to understand the context here, why are we vendoring meson instead of installing it from, e.g., github?

Because we need mesonbuild/meson#11307 to add SIMD support, and that's a large PR that isn't in a released Meson version. Since Meson by design cannot be extended by a third-party plugin or some such thing, we vendor it until our changes have been upstreamed and released.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rgommers

rgommers commented Aug 11, 2023

Copy link
Copy Markdown
Member Author

Note that this is temporary, it will go away. So no worries about a long-term split of spin.

If you want the vendored content to go away asap, then there must be a way in spin itself to set the meson_cli executable as done in this PR. This is the key bit:

# The numpy-vendored version of Meson
meson_cli = [sys.executable,
             str(pathlib.Path(__file__).parent.parent.resolve() /
                 'vendor

That may be a nice feature to have in case this happens again.

I had a really hard time with debugging this stuff by the way. spin swallows tracebacks, so all I got were one-liners like:

abort: 'meson' is not a recognized command

or some such thing. Have you seen that too? You should be able to reproduce this by changing the 'meson' string to 'nonexisting'` in any command.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stefanv

stefanv commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

I'll get a spin PR ready ASAP; I'm sorry to hear you lost time on this :/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rgommers

rgommers commented Aug 12, 2023

Copy link
Copy Markdown
Member Author

LGTM. It will help with the backports if they are done in the correct order, so having that documented somewhere is desirable.

@charris I think we're ready for the backports now, in this order:

  • ENH: Vendor meson for multi-target build support #24379
  • this PR
  • BLD, SIMD: The meson CPU dispatcher implementation  #23096
  • MAINT: Remove versioneer #24196

I'd suggest then adding an xfail on the 1.26.x branch for gh-24399. At that point, we should have everything working, and we can add release notes and tag a pre-release. I suggest making it a beta rather than an RC, because it's highly likely that we'll have to make further tweaks. It also is a flag to downstream perhaps that they should actually pay attention to their build logs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@charris

charris commented Aug 12, 2023

Copy link
Copy Markdown
Member

I think we're ready for the backports now, in this order:

Great, let's see how it goes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@charris charris mentioned this pull request Aug 12, 2023
BLD: vendor meson-python to make the Windows builds with SIMD work #24404
Merged
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 12, 2023
@charris

charris commented Aug 13, 2023

Copy link
Copy Markdown
Member

The backports went in without much trouble.

rgommers reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

36 - Build Build related PR component: build component: CI Meson Items related to the introduction of Meson as the new build system for NumPy

Projects

None yet

Milestone

2.0.0 release

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@rgommers @charris @stefanv
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.