-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add a numpy dependency with pkg-config and configtool methods #12799
Conversation
The two failing CI jobs are unrelated, those 3 failures are visible on other recent PRs as well.
|
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.
It's really unfortunate that the pkg-config files end up somewhere hard to find. I wonder if we should do some internal checking to add python's site-packages to the pkg-config path for python based dependencies? Even if we do that's out of scope for this PR
I would like to push that forward at some point. It needs a change/agreement on the Python packaging side though for what goes where. It'd make sense to have |
A per package "standard" location is essentially what pybind11 does, in the sense that A global one that covers all packages would not make much sense in site-packages since then users could do
which means, use |
I would also update the dependencies.md page... |
These are being added for NumPy 2.0 The implementation closely follows the one for the pybind11 dependency.
b4c9f01
to
35ef16b
Compare
That is not hard to avoid, e.g. by using
I'm going to see if I can add a NumPy build option for that, but I do not have much hope of getting any kind of agreement on that from Python packaging folks.
Good catch, thanks. Added now. |
@rgommers Would it be possible to have the |
Agreed that it is very ugly for older versions.
Yes, that's a problem. Also, it could only be in numpy 1.26.5, which I'm not sure is all that helpful here (too new) since many projects want to support numpy versions that are 1 or 2 years old. The nicer alternative, which makes |
That's the reason why I was thinking about distributing a Adding support in meson is also an option, especially if meson already has special handling for numpy anyway. |
I'll give it a go then, to prevent users having to add a separate dependency just for this. |
I put up gh-12891 with a numpy system dependency for discussion. |
These are being added for NumPy 2.0 (see numpy/numpy#25570 (comment)). The implementation closely follows the one for the
pybind11
dependency.