Skip to content

Commit 6c572e8

Browse files
authored
Merge pull request #2537 from h-vetinari/pin_comp
remove remaining leftovers of old numpy pinning
2 parents dcaaacc + 5c2668c commit 6c572e8

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

docs/maintainer/adding_pkgs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,6 @@ Jinja expressions serve following purposes in the meta.yaml:
11741174
- numpy
11751175
run:
11761176
- python
1177-
- {{ pin_compatible('numpy') }}
11781177
```
11791178

11801179
For more information please refer to the [Templating with Jinja](https://docs.conda.io/projects/conda-build/en/stable/resources/define-metadata.html#templating-with-jinja) section in the conda-build docs.

docs/maintainer/pinning_deps.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,38 @@ Should be replaced by
4444
requirements:
4545
host:
4646
- gmp
47+
# most libraries will automatically add the corresponding runtime requirement using
48+
# a so-called "run-export" from the gmp build pulled into the host environment.
49+
# In that case you can leave out the following run-requirement:
4750
run:
4851
- gmp
4952
```
5053
51-
When there's a new ABI version of gmp (say 7.0), then conda-forge-pinning will be updated. A re-rendering of a package using gmp will change. Therefore to check that a recipe needs to be rebuilt for updated pinnings, you only need to check if the package needs a rerender.
54+
The run-export mechanism (see below) additionally ensures the correct version constraints
55+
(corresponding to the expected API/ABI stability of `gmp`) are added, so a recipe with an
56+
unpinned `gmp` dependency in the host environment will, in the end, work as follows:
5257

53-
:::note
58+
```yaml
59+
requirements:
60+
host:
61+
- gmp {{ version_from_global_pinning }}.*
62+
run:
63+
- gmp >={{ version_from_global_pinning }},<{{ next_version_with_breaking_changes }}
64+
```
5465

55-
`NumPy` is an exception to this (See [Building Against NumPy](knowledge_base.md#linking-numpy)).
66+
When there's a new ABI version of gmp (say 7.0), then conda-forge-pinning will be updated. A re-rendering of a package using gmp will change. Therefore to check that a recipe needs to be rebuilt for updated pinnings, you only need to check if the package needs a rerender.
5667

5768
:::
5869

5970
If a package is not pinned in [conda-forge-pinning](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml), then the pinning needs to be done manually. If the package is a `C/C++` library with a `C/C++` API that is consumed and linked to by other libraries, then that package is a candidate to be added to `conda-forge-pinning`. Please open an issue in [conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock) for discussion.
6071

6172
:::note
6273

63-
If the constraints in `conda-forge-pinning` are not strict enough, you can override them by changing back to pinning the package with a version manually. You can make a pinning stricter by adding `{{ pin_compatible('gmp', max_pin='x.x.x') }}` to run requirements.
74+
If the constraints in `conda-forge-pinning` (resp. those coming from the package's run-exports)
75+
are not strict enough, you can override them by changing back to pinning the package with
76+
a version manually.
77+
You can make a pinning stricter by adding `{{ pin_compatible('gmp', max_pin='x.x.x') }}`
78+
to run requirements.
6479

6580
:::
6681

0 commit comments

Comments
 (0)