Skip to content

Align conda-forge recipe and workflow with the feedstock - #202

Merged
antonwolfy merged 4 commits into
masterfrom
align-cf-recipe-with-feedstock
Nov 9, 2026
Merged

antonwolfy merged 4 commits into
masterfrom
align-cf-recipe-with-feedstock

Conversation

@antonwolfy

@antonwolfy antonwolfy commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

This PR aligns conda-recipe-cf and the "Conda package using conda-forge" workflow with conda-forge/mkl_random-feedstock, so that upstream CI builds what conda-forge ships.

Recipe (conda-recipe-cf/meta.yaml)

  • At run time, require numpy >=1.26.4 instead of pin_compatible('numpy', min_pin="x.x", max_pin="x"). With the old pin, a package built against numpy 2.3 required numpy >=2.3,<3, which contradicts pyproject.toml. numpy is also removed from ignore_run_exports.
  • Drop the explicit mkl run requirement. The weak run_export of mkl-devel already adds mkl >=X.Y,<X+1.
  • Add meson >=1.8.3 to host, as meson.build requires.
  • Move cmake and ninja to build requirements and drop wheel, which meson-python doesn't use.

Build config (conda-recipe-cf/conda_build_config.yaml)

  • Drop the compiler version pins (only cxx_compiler_version: 14 was set on Linux), so the newest conda-forge compilers are used.
  • Use the feedstock's C standard library pins: sysroot 2.17 (was 2.28) and macOS deployment target 11.0.
  • Build against numpy 2, as the feedstock does.

Build scripts

  • Copy the feedstock's comments explaining why MKLROOT must not be set.

Workflow (conda-package-cf.yml)

  • Drop numpy from the matrix. Builds use the newest numpy 2.x for each Python, as the feedstock does, through numpy: '2' in conda_build_config.yaml (passing --numpy 2 to conda build fails, because it turns into the unparsable version "2."). Test environments get the newest numpy 2.x without a pin. Before, Python 3.11 to 3.14 built and tested against numpy 2.3, while the feedstock uses 2.4.6 or 2.5.4.
  • Drop Python 3.10 from the matrix. conda-forge no longer builds it, and other workflows still test it.
  • Test the built package with conda build --test, which runs the recipe's test section (the imports, pip check and pytest), as the feedstock does. Before, the test jobs ran only pytest, and pip check from the recipe never ran because the build uses --no-test. The test jobs stay separate from the build jobs.

- Require numpy >=1.26.4 at runtime instead of pin_compatible, as in
  pyproject.toml and the feedstock
- Take mkl from the mkl-devel run_exports
- Require meson >=1.8.3, as meson.build does
- Move cmake and ninja to build requirements and drop wheel
- Drop compiler version pins and use the feedstock's stdlib pins
  (sysroot 2.17, macOS 11.0)
- Note in build scripts why MKLROOT must not be set
- Build against the latest numpy 2.x and drop Python 3.10 from the
  conda-forge workflow matrix
conda build --numpy 2 turns the pin into the version "2.", which
libmamba fails to parse. Set numpy: '2' in conda_build_config.yaml, as
the feedstock does, and drop numpy from the workflow matrix: the test
environments get the newest numpy 2.x without a pin.
Test the built package with the test section of conda-recipe-cf, as the
feedstock does: the imports, pip check and pytest. The test jobs stay
separate from the build jobs.

@jharlow-intel jharlow-intel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, and running the recipe's own test section means pip check finally runs in CI.

@antonwolfy
antonwolfy merged commit c5718d0 into master Nov 9, 2026
95 checks passed
@antonwolfy
antonwolfy deleted the align-cf-recipe-with-feedstock branch November 9, 2026 17:28
jharlow-intel added a commit that referenced this pull request Nov 9, 2026
.github/copilot-instructions.md follows the mkl_fft and mkl_umath ones,
with #91's rules checked against the meson build. The root AGENTS.md
gains #91's two RNG guardrails, so agents that read only AGENTS.md get
them too. .github/AGENTS.md says how each conda workflow tests the
package since #202.

Co-authored-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants