Change handling of numpy x.x so that it is only needed as a build requirement #653
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.
I just noticed #650, which goes in the opposite direction to some extent. GIven that, let me start with an overview of what I see as the problem and solution...
The released implementation of
numpy x.x
(a desirable feature) is, arguably, broken because it is very easy to build a package which does not match its runtime dependencies as listed ininfo/index.json
for the recipe, or has the wrong build id, or has a build id which indicate it was built against a different version of numpy than it was actually built against.Some examples, organized by the numpy build/run requirements in
meta.yaml
:numpy x.x
; runtime requirement:numpy
(ornumpy >1.7
or anything exceptnumpy x.x
)CONDA_NPY
.build_id
is_pyX.Y_0
and requirement ininfo/index.json
is whatever the runtime numpy requirement was listed as (numpy
ornumpy >=1.7
or whatever).numpy
; runtime requirement:numpy x.x
CONDA_NPY
build_id
is_npA.BpyX.Y_0
and requirement ininfo/index.json
isnumpy A.B
, where the numpy version isCONDA_NPY
.I don't know if this second case is addressed in #650, but would argue for this alternative syntax (convention?) instead, regardless of whether this PR is the right way to implement it:
CONDA_NPY
then putnumpy x.x
in the build requirement. This makes sense to me becauseCONDA_NPY
is about how you build, not how you run.numpy x.x
is used as the runtime build spec then there is no way to express in the recipe what versions of numpy the package is, in principle, compatible with.CONDA_NPY
in both build and run....this PR is one imlementation of that.Pinging a few people on this who have comment on/raised issues related to the original
numpy x.x
(which is a good idea!): @pelson @Juanlu001 @seibert @rmcgibbo (please also look at #650).Also, because I know they spend lots of time building: @ChrisBarker-NOAA @ocefpaf