Skip to content

Commit

Permalink
ENH: Add example of conda_build_config.yaml python_min map
Browse files Browse the repository at this point in the history
* Add example of the map that is required for python_min to be manually
  enforced if it exists in recipe/conda_build_config.yaml.
* Add a tip that adding an explicit python_min also ensures that
  python_min used by conda-build does not deviate from the required
  Python metadata in the Python package. If the Python package
  required Python metadata is updated and the feedstock's recipe is not
  the build will fail, signalling that there is a metadata mismatch that
  needs to be corrected.
  • Loading branch information
matthewfeickert committed Nov 12, 2024
1 parent 1f144ed commit 7a56541
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions docs/maintainer/knowledge_base.md
Original file line number Diff line number Diff line change
Expand Up @@ -1511,9 +1511,24 @@ at the top of your recipe like this
{% set python_min = "3.10" %}
```

It also possible to achieve the same effect by adding a `conda_build_config.yaml` file to your recipe. If you go that route,
you will need to [rerender the feedstock](../infrastructure/#conda-forge-admin-please-rerender) after adding the
`conda_build_config.yaml` file.
It also possible to achieve the same effect by adding a `conda_build_config.yaml` file to your recipe that
contains a map like

```yaml title="recipe/conda_build_config.yaml"
python_min:
- "3.10"
```

If you go that route, you will need to [rerender the feedstock](../infrastructure/#conda-forge-admin-please-rerender)
after adding the `conda_build_config.yaml` file.

:::tip[Hint]

Adding an explicit `python_min` to your `noarch: python` recipe can be an effective way to ensure the required
Python in your package's metadata is enforced at `conda-build` time, as the build will fail if the package's
required Python version is newer than `python_min`.

:::

:::note

Expand Down

0 comments on commit 7a56541

Please sign in to comment.