Skip to content

Commit 7a56541

Browse files
ENH: Add example of conda_build_config.yaml python_min map
* 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.
1 parent 1f144ed commit 7a56541

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/maintainer/knowledge_base.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,9 +1511,24 @@ at the top of your recipe like this
15111511
{% set python_min = "3.10" %}
15121512
```
15131513

1514-
It also possible to achieve the same effect by adding a `conda_build_config.yaml` file to your recipe. If you go that route,
1515-
you will need to [rerender the feedstock](../infrastructure/#conda-forge-admin-please-rerender) after adding the
1516-
`conda_build_config.yaml` file.
1514+
It also possible to achieve the same effect by adding a `conda_build_config.yaml` file to your recipe that
1515+
contains a map like
1516+
1517+
```yaml title="recipe/conda_build_config.yaml"
1518+
python_min:
1519+
- "3.10"
1520+
```
1521+
1522+
If you go that route, you will need to [rerender the feedstock](../infrastructure/#conda-forge-admin-please-rerender)
1523+
after adding the `conda_build_config.yaml` file.
1524+
1525+
:::tip[Hint]
1526+
1527+
Adding an explicit `python_min` to your `noarch: python` recipe can be an effective way to ensure the required
1528+
Python in your package's metadata is enforced at `conda-build` time, as the build will fail if the package's
1529+
required Python version is newer than `python_min`.
1530+
1531+
:::
15171532

15181533
:::note
15191534

0 commit comments

Comments
 (0)