Skip to content

Commit

Permalink
docs: corrections to docs and GHA summary (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored May 27, 2024
1 parent 0e7bc67 commit 82bfd76
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
22 changes: 11 additions & 11 deletions docs/recipe_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ build:
### Include build recipe

The recipe and rendered `recipe.yaml` file are included in
the `package\_metadata` by default. You can disable this by passing
the `package_metadata` by default. You can disable this by passing
`--no-include-recipe` on the command line.

!!! note
Expand Down Expand Up @@ -520,7 +520,7 @@ version is part of the package dependencies, list `numpy` as a requirement in
`recipe.yaml` and use a `conda_build_config.yaml` file with multiple NumPy
versions.

### Run constrained
### Run constraints

Packages that are optional at runtime but must obey the supplied additional
constraint if they are installed.
Expand All @@ -530,24 +530,24 @@ specifications](https://conda.io/projects/conda/en/latest/user-guide/concepts/pk

```yaml
requirements:
run_constrained:
run_constraints:
- optional-subpackage ==${{ version }}
```

For example, let's say we have an environment that has package "a" installed at
version 1.0. If we install package "b" that has a `run\_constrained` entry of
"`a\>1.0`", then `mamba` would need to upgrade "a" in the environment in order to
version 1.0. If we install package "b" that has a `run_constraints` entry of
"`a >1.0`", then `mamba` would need to upgrade "a" in the environment in order to
install "b".

This is especially useful in the context of virtual packages, where the
`run\_constrained` dependency is not a package that `mamba` manages, but rather a
`run_constraints` dependency is not a package that `mamba` manages, but rather a
[virtual
package](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html)
that represents a system property that `mamba` can't change. For example, a
package on Linux may impose a `run\_constrained` dependency on `\_\_glibc\>=2.12`.
package on Linux may impose a `run_constraints` dependency on `__glibc >=2.12`.
This is the version bound consistent with CentOS 6. Software built against glibc
2.12 will be compatible with CentOS 6. This `run\_constrained` dependency helps
`mamba` tell the user that a given package can't be installed if their system
2.12 will be compatible with CentOS 6. This `run_constraints` dependency helps
`mamba`, `conda` or `pixi` tell the user that a given package can't be installed if their system
glibc version is too old.

### Run exports
Expand All @@ -560,7 +560,7 @@ Example from `zlib`:
```yaml
requirements:
run_exports:
- {{ pin_subpackage('libzlib', exact=True) }}
- ${{ pin_subpackage('libzlib', exact=True) }}
```

Run exports are weak by default. But you can also define strong `run_exports`.
Expand All @@ -569,7 +569,7 @@ Run exports are weak by default. But you can also define strong `run_exports`.
requirements:
run_exports:
strong:
- {{ pin_subpackage('libzlib', exact=True) }}
- ${{ pin_subpackage('libzlib', exact=True) }}
```

### Ignore run exports
Expand Down
6 changes: 4 additions & 2 deletions src/render/resolved_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ impl FinalizedRunDependencies {
if !self.depends.is_empty() {
let mut row = comfy_table::Row::new();
row.add_cell(
comfy_table::Cell::new("Depends").add_attribute(comfy_table::Attribute::Bold),
comfy_table::Cell::new("Run dependencies")
.add_attribute(comfy_table::Attribute::Bold),
);
table.add_row(row);

Expand All @@ -229,7 +230,8 @@ impl FinalizedRunDependencies {
if !self.constrains.is_empty() {
let mut row = comfy_table::Row::new();
row.add_cell(
comfy_table::Cell::new("Constrains").add_attribute(comfy_table::Attribute::Bold),
comfy_table::Cell::new("Run constraints")
.add_attribute(comfy_table::Attribute::Bold),
);
table.add_row(row);

Expand Down

0 comments on commit 82bfd76

Please sign in to comment.