8000 BLD: unvendor meson-python on 1.26.x and upgrade to meson-python 0.15 by rgommers · Pull Request #25748 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@rgommers
Copy link
Mem 10000 ber
@rgommers rgommers commented Feb 2, 2024

This is a backport of gh-25008. It closes gh-25681.

The meson-python 0.15.0 release added the ability to configure a
custom `meson` in `pyproject.toml`. So there's no longer a need for
us to vendor it.

(cherry picked from commit 6544e33,
 adding a version range to depend on meson-python 0.15.x)
@rgommers rgommers added 36 - Build Build related PR Meson Items related to the introduction of Meson as the new build system for NumPy labels Feb 2, 2024
@rgommers rgommers added this to the 1.26.4 release milestone Feb 2, 2024
@rgommers
Copy link
Member Author
rgommers commented Feb 2, 2024

The Windows wheel build failures showing Invalid --only='""' are due to an issue with cibuildwheel pypa/cibuildwheel#1740. Upgrading to fix that.

This fixes issues with Windows wheel builds; a new GitHub Actions
runner image caused argument escaping to break.
@rgommers
Copy link
Member Author
rgommers commented Feb 2, 2024

The other issue is in the regular musllinux job:

$ /__w/numpy/numpy/test_env/bin/python -m pytest --rootdir=/__w/numpy/numpy/build-install/usr/lib/python3.10/site-packages -n auto -m 'not slow' numpy
/__w/numpy/numpy/test_env/lib/python3.10/site-packages/_pytest/config/__init__.py:328: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
ConftestImportFailure: ImportError: Error importing numpy: you should not try to import numpy from
        its source directory; please exit the numpy source tree, and relaunch
        your python interpreter from there. (from /__w/numpy/numpy/build-install/usr/lib/python3.10/site-packages/numpy/conftest.py)
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
  config = pluginmanager.hook.pytest_cmdline_parse(
ImportError while loading conftest '/__w/numpy/numpy/build-install/usr/lib/python3.10/site-packages/numpy/conftest.py'.
numpy/__init__.py:135: in <module>
    raise ImportError(msg) from e
E   ImportError: Error importing numpy: you should not try to import numpy from
E           its source directory; please exit the numpy source tree, and relaunch
E           your python interpreter from there.

Looks like that is due to a new pluggy version (1.4.0, released last week) - yay for transitive dependencies: matplotlib/pytest-mpl#221. It's almost holiday time for me, so I'm inclined to just ignore that for now on 1.26.x, since it's harmless.

@charris
Copy link
Member
charris commented Feb 2, 2024

since it's harmless.

The wheels look to be built and pass, which is my main concern, but I suspect that is a bit of an accident, perhaps because pytest is pinned to 7.4.0 in test_requirements and those requirements are installed before running the wheel tests. Alternatively, the wheel tests are -mfast, while the musl tests are -m 'not slow'.

In any case we may want to look at numpy/conftest.py, which has

#FIXME when yield tests are gone.
@pytest.hookimpl()
def pytest_itemcollected(item):

We still have yield tests. Scipy doesn't have the hook, so that is good.

@charris charris merged commit 837cd38 into numpy:maintenance/1.26.x Feb 2, 2024
@charris
Copy link
Member
charris commented Feb 2, 2024

Thanks Ralf.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0