@@ -1057,15 +1057,15 @@ Python package, perfectly eligible for ``noarch: python``, but on Windows it req
1057
1057
have something like:
1058
1058
1059
1059
.. code-block :: yaml
1060
+ :caption : recipe/meta.yaml (original)
1060
1061
1061
- # recipe/meta.yaml
1062
1062
name : package
1063
1063
source :
1064
- ...
1064
+ # ...
1065
1065
build :
1066
1066
number : 0
1067
1067
requirements :
1068
- ...
1068
+ # ...
1069
1069
run :
1070
1070
- python
1071
1071
- numpy
@@ -1074,16 +1074,16 @@ have something like:
1074
1074
We can replace it with:
1075
1075
1076
1076
.. code-block :: yaml
1077
+ :caption : recipe/meta.yaml (modified)
1077
1078
1078
- # recipe/meta.yaml
1079
1079
name : package
1080
1080
source :
1081
- ...
1081
+ # ...
1082
1082
build :
1083
1083
number : 0
1084
1084
noarch : python
1085
1085
requirements :
1086
- ...
1086
+ # ...
1087
1087
run :
1088
1088
- python
1089
1089
- numpy
@@ -1096,8 +1096,8 @@ Cool! Where does ``target_os`` come from? We need to define it in ``conda_build_
1096
1096
Note how the values have been chosen carefully so they match the virtual packages names:
1097
1097
1098
1098
.. code-block :: yaml
1099
+ :caption : recipe/conda_build_config.yaml
1099
1100
1100
- # recipe/conda_build_config.yaml
1101
1101
target_os :
1102
1102
- unix # [unix]
1103
1103
- win # [win]
@@ -1107,8 +1107,8 @@ the ``target_os`` matrix would only provide the ``unix`` value (because the ``#
1107
1107
would never be true). Fortunately, we can change the default behaviour in ``conda-forge.yml ``:
1108
1108
1109
1109
.. code-block :: yaml
1110
+ :caption : conda-forge.yml
1110
1111
1111
- # conda-forge.yml
1112
1112
noarch_platforms :
1113
1113
- linux-64
1114
1114
- win-64
@@ -1120,16 +1120,16 @@ only one is true at a time. Perfect! All these changes require a feedstock reren
1120
1120
Last but not least, what if you need conditional dependencies on all three operating systems? Do it like this:
1121
1121
1122
1122
.. code-block :: yaml
1123
+ :caption : recipe/meta.yaml
1123
1124
1124
- # recipe/meta.yaml
1125
1125
name : package
1126
1126
source :
1127
- ...
1127
+ # ...
1128
1128
build :
1129
1129
number : 0
1130
1130
noarch : python
1131
1131
requirements :
1132
- ...
1132
+ # ...
1133
1133
run :
1134
1134
- python
1135
1135
- numpy
@@ -1143,16 +1143,16 @@ Last but not least, what if you need conditional dependencies on all three opera
1143
1143
{% endif %}
1144
1144
1145
1145
.. code-block :: yaml
1146
+ :caption : recipe/conda_build_config.yaml
1146
1147
1147
- # recipe/conda_build_config.yaml
1148
1148
target_os :
1149
1149
- linux # [linux]
1150
1150
- osx # [osx]
1151
1151
- win # [win]
1152
1152
1153
1153
.. code-block :: yaml
1154
+ :caption : conda-forge.yml
1154
1155
1155
- # conda-forge.yml
1156
1156
noarch_platforms :
1157
1157
- linux-64
1158
1158
- osx-64
0 commit comments