conda-forge / openpmd-api-feedstock

A conda-smithy repository for openpmd-api.
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

numpy: pin compatible #102

Closed ax3l closed 1 year ago

ax3l commented 1 year ago

Use best practice.

Might help with https://github.com/conda-forge/staged-recipes/pull/22171, might not...

Checklist

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

ax3l commented 1 year ago

@conda-forge-admin, please rerender

github-actions[bot] commented 1 year ago

Hi! This is the friendly conda-forge automerge bot!

Commits were made to this PR after the automerge label was added. For security reasons, I have disabled automerge by removing the automerge label. Please add the automerge label again (or ask a maintainer to do so) if you'd like to enable automerge again!

carterbox commented 1 year ago

If you want this package to support numpy=>1.15, then the package spec should be the following:

host:
  - numpy =1.15.*
run:
  - {{ pin_compatible('numpy') }}

This would be detemplated to

host:
  - numpy =1.15.x  # where x is the latest available minor version
run:
  - numpy >=1.15.x,<2

But we prefer if you leave the numpy version blank.

host:
  - numpy
run:
  - {{ pin_compatible('numpy') }}

This would be detemplated to

host:
  - numpy =pinned  # where pinned is the version we set channel wide. It's 1.20 or something.
run:
  - numpy >=pinned,<2

The following is wrong because it makes the runtime requirement unreasonably high.

host:
  - numpy >=1.15
run:
  - {{ pin_compatible('numpy') }}

This would be detemplated to

host:
  - numpy =1.30 # The latest numpy version
run:
  - numpy >=1.30,<2 # This version is too new!

https://conda-forge.org/docs/maintainer/knowledge_base.html#building-against-numpy

ax3l commented 1 year ago

Thanks for the guidance!

I do not understand why the request of a lower version than the pinned one pushes up the pin, but I will simply remove it since there is no risk ending up with an old version on CF :)