Skip to content

Commit ca54541

Browse files
authored
Remove hashes for conda-build 3.25.0
1 parent 7b58e00 commit ca54541

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/maintainer/knowledge_base.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ relies on three concepts:
10521052
``__unix`` is present in both Linux and MacOS. Note that this feature is **only fully available
10531053
on conda 4.10 or above**.
10541054
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.
10551056

10561057
The idea is to generate different noarch packages for each OS needing different dependencies.
10571058
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:
10731074
- windows-only-dependency # [win]
10741075
10751076
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!
10781079

1079-
.. code-block:: yaml+jinja
1080+
.. code-block:: yaml
10801081
:caption: recipe/meta.yaml (modified)
10811082
10821083
name: package
10831084
source:
10841085
# ...
10851086
build:
10861087
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]
10901088
noarch: python
10911089
requirements:
10921090
host:
@@ -1126,10 +1124,6 @@ If you need conditional dependencies on all three operating systems, this is how
11261124
# ...
11271125
build:
11281126
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]
11331127
noarch: python
11341128
requirements:
11351129
# ...

0 commit comments

Comments
 (0)