-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BLD, TST: refactor test to use meson not setup.py, improve spin test -m ... #24153
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
Hmm. meson can be installed by pip, but what do we do about ninja? It is a hard requirement to run meson. I guess we should skip the build-a-module tests if ninja is not installed. Edit: nvrmind: ninja can be pip installed too! |
c74cfaa
to
b15a55f
Compare
Any ideas how to avoid
but this seems to not work on pyodide
even though the |
I think |
The relevant tests are skipped. The problem is that |
Ah, that makes sense. It should already be present in most all CI runs (except for the ones with build isolation perhaps), because it's needed for building. It falls in the same category as compilers, pkg-config, etc. - I'd say it should not be in |
tl;dr this is an Ubuntu job, so just install it with |
Kind of. "this" is also all wheel builds, which build in an isolated environment and then test. |
ninja is needed a bit everywhere. While it can be installed by apt and choco, it is not clear how to install it on macOS. Apparently there is no yum package of that name available in the |
That sounds fine to me. |
Looking more closely at the ninja PyPI package, it seems like a valid wheel solution to provide a binary for all platforms. It is a shame I needed to add it everywhere
|
This is ready for review:
|
On the topic of
I've run into the same problem while working on pypa/cibuildwheel#1456 and I would like to fix it soon. There's a lot of complexity involved in convincing pip to behave correctly since it needs to run on the host linux Python but install stuff for emscripten Python. I think the correct way to fix this is to use |
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 looks quite good, thanks Matti. I have only one significant comment.
tools/travis-test.sh
Outdated
@@ -80,6 +80,13 @@ setup_base() | |||
|
|||
run_test() | |||
{ | |||
# meson has a hard dependency on ninja, and we need meson to build |
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.
minor: it'd be good not to repeat the same comment multiple times; can you either remove this or change to something like "see note in pyproject.toml
for why ninja is installed as a test requirement"?
numpy/random/tests/test_extending.py
Outdated
cwd=str(build_dir), | ||
) | ||
# We don't want a wheel build, so do the steps in a controlled way | ||
# The meson.build file is not copied as part of the build, so generate it |
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 should not be necessary, you can install any file you want/need. Can you commit a regular meson.build
file in random/_examples/cython/
and edit random/meson.build
to install it rather than the _examples/cython/setup.py
file that's installed now?
|
I addressed the review comments, CI is passing. |
It looks very red to me. |
I think you forgot to commit the new |
Thanks. Committed now, I guess I should refresh (f5) before jumping to conclusions. |
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.
LGTM now, in it goes. Thanks Matti!
We may want to backport some of this to 1.26, so marking. |
Seems we don't need it, so removing label. |
This PR has two parts:
spin test -m full
which will run the full test suiterandom/tests/test_extending.py
to use mesonMarking as draft to also refactor
numpy.testing.extbuild
to use meson as well.