@@ -1052,6 +1052,7 @@ relies on three concepts:
1052
1052
``__unix `` is present in both Linux and MacOS. Note that this feature is **only fully available
1053
1053
on conda 4.10 or above **.
1054
1054
2. ``conda-forge.yml ``'s :ref: `noarch_platforms ` option.
1055
+ 3. **conda-build 3.25.0 or above ** changing the build hash depending on virtual packages used.
1055
1056
1056
1057
The idea is to generate different noarch packages for each OS needing different dependencies.
1057
1058
Let's say you have a pure Python package, perfectly eligible for ``noarch: python ``, but on Windows
@@ -1073,20 +1074,17 @@ it requires ``windows-only-dependency``. You might have something like:
1073
1074
- windows-only-dependency # [win]
1074
1075
1075
1076
Being non-noarch, this means that the build matrix will include at least 12 outputs: three platforms,
1076
- times four Python versions. This gets worse with arm64, aarch64 and ppc64le in the mix. We can get it down
1077
- to two outputs if replace it with this other approach!
1077
+ times four Python versions. This gets worse with `` arm64 ``, `` aarch64 `` and `` ppc64le `` in the mix.
1078
+ We can get it down to two outputs if replace it with this other approach!
1078
1079
1079
- .. code-block :: yaml+jinja
1080
+ .. code-block :: yaml
1080
1081
:caption : recipe/meta.yaml (modified)
1081
1082
1082
1083
name : package
1083
1084
source :
1084
1085
# ...
1085
1086
build :
1086
1087
number : 0
1087
- # You NEED to include the platform in the build string to avoid hash collisions
1088
- string: "unix_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}" # [unix]
1089
- string: "win_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}" # [win]
1090
1088
noarch : python
1091
1089
requirements :
1092
1090
host :
@@ -1126,10 +1124,6 @@ If you need conditional dependencies on all three operating systems, this is how
1126
1124
# ...
1127
1125
build:
1128
1126
number: 0
1129
- # You NEED to include the platform in the build string to avoid hash collisions
1130
- string: "linux_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}" # [linux]
1131
- string: "osx_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}" # [osx]
1132
- string: "win_pyh{{ PKG_HASH }}_{{ PKG_BUILDNUM }}" # [win]
1133
1127
noarch: python
1134
1128
requirements:
1135
1129
# ...
0 commit comments