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: only install the `f2py` command, not `f2py3` or `f2py3.X` by rgommers · Pull Request #24235 · numpy/numpy

Conversation

@rgommers

@rgommers rgommers commented Jul 22, 2023

Copy link
Copy Markdown
Member

Also fix a build warning for a missing check keyword in a run_command call, and some other build file cleanups.

This takes care of an open issue from the Meson build migration (xref gh-23981).

Use of f2py3 is not present at all in the docs, and Python 2.7 is well and truly gone now. Using f2py3.11 or similar is even less common, difficult to support (it prevents keeping the metadata in pyproject.toml completely static), and it's perfectly fine in those cases anyway to use python3.11 -m numpy.f2py.

Going via a specific Python interpreter executable has become more commonplace, e.g. python -m pip to ensure picking up the correct version of pip.

Sorry, something went wrong.

Uh oh!

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

All reactions
rgommers added 3 commits July 22, 2023 18:23
@rgommers
BLD: fix a build warning for missing check in run_command
52410a7
Also extend a comment on linking libm, and clean up a few lines of
unused code.
@rgommers
BLD: add comment on where platforms to build wheels for are controlled
cab23e5
Addresses a task in numpygh-23981.
@rgommers
BLD: only install the f2py command, not f2py3 or f2py3.X
55b7c3d
This takes care of an open issue from the Meson build migration
(xref numpygh-23981).

Use of `f2py3` is not present at all in the docs, and Python 2.7
is well and truly gone now. Using `f2py3.11` or similar is even less
common, difficult to support (it prevents keeping the metadata in
`pyproject.toml` completely static), and it's perfectly fine in
those cases anyway to use `python3.11 -m numpy.f2py`.

Going via a specific Python interpreter executable has become more
commonplace, e.g. `python -m pip` to ensure picking up the correct
version of `pip`.
@rgommers rgommers added 36 - Build Build related PR Meson Items related to the introduction of Meson as the new build system for NumPy labels Jul 22, 2023
@rgommers rgommers added this to the 2.0.0 release milestone Jul 22, 2023
@charris

charris commented Jul 22, 2023

Copy link
Copy Markdown
Member

and it's perfectly fine in those cases anyway to use python3.11 -m numpy.f2py.

I think it should be documented as the preferred way. Like pip, there is always the problem of which numpy is being used, which can a problem when there are multiple installations.

rgommers and HaoZeke reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@charris
charris merged commit c41f919 into numpy:main Jul 22, 2023
@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Jul 22, 2023
@rgommers
rgommers deleted the meson-fixes branch July 22, 2023 19:21
@charris charris modified the milestones: 2.0.0 release, 1.26.0 release Jul 23, 2023
@eli-schwartz

eli-schwartz commented Jul 24, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Does f2py actually produce different results based on the python version it is running under, even for python2 vs python3? Or does it only change depending on the numpy version (which makes sense, different versions of f2py will naturally tend to produce different results)?

If anything, maybe there should be a f2py2.0 and f2py1.26. 😛

...

The original rationale in f22a33b appears to have been "because linux distros" which seems misguided as Linux distros should just be shipping a single entrypoint anyway for command-line programs. When they break this theme it causes issues such as "there is no cython command on Debian because the python2-cython package was deleted"...

All reactions

Sorry, something went wrong.

Uh oh!

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

@rgommers

rgommers commented Jul 24, 2023

Copy link
Copy Markdown
Member Author

Does f2py actually produce different results based on the python version it is running under

Not for transpiling to C/Fortran wrappers only, but f2py -c produces a Python extension module in one go, so yes that'll be different.

The original rationale in f22a33b appears to have been "because linux distros" which seems misguided as Linux distros should just be shipping a single entrypoint anyway for command-line programs.

Agreed. I think a single f2py command is better.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rgommers rgommers mentioned this pull request Jul 24, 2023
Tracking issue: defaulting to Meson - follow-up tasks #23981
Closed
18 of 20 tasks
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 3, 2023
@charris charris removed this from the 1.26.0 release milestone Aug 3, 2023
@smiet smiet mentioned this pull request Aug 6, 2024
FindF2PY: ensure generic f2py executable is looked up first scikit-build/scikit-build#1111
Merged
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 Meson Items related to the introduction of Meson as the new build system for NumPy

Projects

None yet

Milestone

No milestone

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 @eli-schwartz
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.