-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: Vendor meson for multi-target build support #24379
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
Conversation
We need this in order to add the "feature" module for SIMD support, which is at mesonbuild/meson#11307.
Already one weird failure, on the
that |
I think the |
There is an error in the log
|
f252d13
to
cefe355
Compare
Good catch - that is a little curious. Guess I'll need to add a check for that. I fixed the other (lint, sdist) failures. Let's see if it happens again. The other submodules did get initialized, so it's unclear to me what the problem was there. |
musl linux is cloning, and then fetching this PR (which has a new submodule), but where is the final numpy/.github/workflows/linux_musl.yml Lines 36 to 46 in 60c8b6a
|
cefe355
to
8854212
Compare
We didn't need it until this PR. I'd expect this to break downstream CI in places as well, but nothing we can do about that beyond a clear error message. Also, sigh: # using git commands to clone because versioneer doesn't work when
# actions/checkout is used for the clone step in a container how things go in circles ... |
I think the problem here is we are adding a new submodule in the PR. Perhaps the previous times we added a submodule (for svml, x86-simd-sort) we didn't check/care that fetching the submodule failed. |
Indeed - that's part of the tradeoff of git submodule vs. inclusion of sources. I think we should simply accept it though, it's part of the deal. This looks ready now, all CI seems happy (the one TravisCI failure is the regular ppc64le job abort). @mattip if this looks good to you, how about we merge this and then I'll try and get the PR to enable SIMD support merge today too? That plus final tweaks to versioneer removal should get us to where we can do a first 1.26.0 pre-release. |
Thanks @rgommers |
Grr, turns out Windows is problematic, prepending to
Maybe it also has to do with the checkout being on
So the right directory is there, but in the If anyone has successfully done this before on Windows, I'm all ears as to how you did it. |
I spent ~ half a day debugging on CI and investigating the problem on Windows. It seems impossible to do this via PATH manipulation. The Unless someone (@eli-schwartz or @mattip maybe?) has an answer to this, I'll go back to a modified |
Oh... that is probably because of the interesting rules for executing scripts on Windows, which is pretty conditional on which APIs you use to start the process. It works fine with I guess you could add upstream meson-python support for setting |
Yes, I think I'd like to add support for |
Which CI run? |
There's ~10 failed builds with different invocations at https://github.com/rgommers/numpy/actions. I'd advise not digging into those, because they won't tell you much beyond "yes the paths were right, and no the My current plan is:
|
Assuming you are in a venv (so sys.executable is in scripts), maybe copy the meson.exe from |
I've tried multiple variations like that already. And in venv or not doesn't matter (and we can't assume anything about that anyway, it should work robustly no matter the type of env). |
It's very much not worth the fuss. Do note however that the meson.exe files are different -- that PE executable is created by taking the base launcher executable vendored in distlib, and appending a zipapp with a |
one option would be to |
That's a no no, we can't just go install a |
gh-24365 was actually the correct and pragmatic approach, modulo that I should have used git submodules there. |
It doesn't need to be beautiful as long as it gets the job done :) |
That's a point of complexity for the |
Right, a .py script is the logical way to do this. It should be safely assumed that if the entrypoint contains an explicit (Apparently there's an optional package containing the "python3" symlink for people that really really want it, but you need to know you need it.) The other possible approach is documenting that the |
Thanks. Agreed, both of those should do the job. I'll open the feature request soon and will try to get this into the next version.
🤦🏼 |
This is a much more minimal alternative to gh-24365. It only vendors Meson, and uses PATH manipulation to get
meson-python
andspin
to pick up our vendored Meson - which is a friendly fork which lives at https://github.com/numpy/meson and is meant to temporarily include the feature we need for SIMD support.Tested in combination with gh-23096, and it looks like everything works. Let's see how happy CI is ....