Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: enable linking of external libraries in the f2py Meson backend #25297

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

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

andrea-bia
Copy link
Contributor

The current state of the f2py meson code fails to transmit external libraries necessary for linking. In contrast, the previous distutils backend successfully achieved this functionality.
I tried to add few lines of code to bring back the functionality

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton for this. It is pragmatic (though the resulting meson.build files are a little odd looking) so I think it would be good to go as soon as:

  • Some documentation is added (especially the migrating to meson page)
  • Also to the CLI help text (f2py2e)

It is worth noting that this functionality can also be achieved by setting up either the environment variables or by using native files, but I think it is a good idea to have as part of f2py as well.

@andrea-bia
Copy link
Contributor Author

Thanks a ton for this. It is pragmatic (though the resulting meson.build files are a little odd looking) so I think it would be good to go as soon as:

* Some documentation is added (especially the migrating to `meson` page)

* Also to the CLI help text (`f2py2e`)

It is worth noting that this functionality can also be achieved by setting up either the environment variables or by using native files, but I think it is a good idea to have as part of f2py as well.

I will update the migrating to meson page. However, regarding the second point, isn't this already enough?

@HaoZeke
Copy link
Member

HaoZeke commented Dec 3, 2023

Thanks a ton for this. It is pragmatic (though the resulting meson.build files are a little odd looking) so I think it would be good to go as soon as:

* Some documentation is added (especially the migrating to `meson` page)

* Also to the CLI help text (`f2py2e`)

It is worth noting that this functionality can also be achieved by setting up either the environment variables or by using native files, but I think it is a good idea to have as part of f2py as well.

I will update the migrating to meson page. However, regarding the second point, isn't this already enough?

Yup it is actually (forgot it doesn't have a NO_MESON in the help). Last question about the dependencies and I think this'll be good to go.

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets get this in, thanks @andrea-bia.

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, last thing, could you squash the changes into one commit? Either:

BUG: Add external library handling for meson [f2py]
or ENH: (similar)

@HaoZeke HaoZeke merged commit 7c6f814 into numpy:main Dec 3, 2023
@HaoZeke
Copy link
Member

HaoZeke commented Dec 3, 2023

Thanks @andrea-bia.

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

Successfully merging this pull request may close these issues.

3 participants