GeezerVison is showing github.com — DOC: remove numpy.distutils usages from user-facing docs by frigggga · Pull Request #33197 · numpy/numpy
Conversation
frigggga
commented
Nov 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
PR summary
numpy.distutils was removed in 2.5.0, but a few user-facing docs and the f2py --help text still described it or relied on it. This PR cleans up those leftovers. I did not touch the release notes, distutils_status_migration.rst or distutils_equivalents.rst, since those are intentionally historical.
doc/source/f2py/windows/intel.rst: the PowerShell example selected the compiler with --f77exec / --f90exec. Those are numpy.distutils-only flags, and the meson backend strips them from argv and ignores them. The example now sets the FC environment variable, which is what f2py's own message and usage.rst recommend.
doc/TESTS.rst: the "__init__.py and setup.py" section told readers to register tests through a numpy.distutils configuration() / config.add_subpackage('tests'), and used numpy.testing.Tester, which no longer exists. It now shows PytestTester and py.install_sources(...), copied from numpy/fft.
numpy/f2py/f2py2e.py: the --backend help said distutils is supported and the default. It now says meson is the only supported backend and the default, and that distutils falls back to meson. This changes help text only; the parser and tests are unchanged.
doc/source/f2py/buildtools/skbuild.rst: reworded the note that pointed readers "away from the internal numpy.distutils methods", so it says to prefer the meson or cmake workflows.
doc/source/f2py/buildtools/meson.rst: fixed a typo (details..).
doc/source/user/c-info.python-as-glue.rst: the two mentions of "distutils" in the ctypes section now say setuptools / "Python's packaging tools".
Fixes #25597
First time contributor introduction
Hi! First time contributor to this repo. Been using numpy at work every now and then but this is the first time diving into contributing to the repo. Starting small with fixing some documentation.
AI Disclosure
I did use Claude to better understand the requests and potential fixes that can be applied and to provide guidance whenever needed. The changes updated so far have been manually typed and verified.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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, pending CI success (the PR touches f2py2e.py, so a full CI run is needed)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
mattip
mattip approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.