Skip to content

Move build system to meson-python - #174

Merged
antonwolfy merged 26 commits into
masterfrom
use-meson-build
Jul 21, 2026
Merged

Move build system to meson-python#174
antonwolfy merged 26 commits into
masterfrom
use-meson-build

Conversation

@ndgrigorian

@ndgrigorianndgrigorian commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

This PR proposes moving from setuptools to meson-python as the mkl-service build system

meson-python is already used by NumPy and allows setup.py to be removed (with its logic moved into the meson.build script)

@ndgrigorian
ndgrigorian marked this pull request as draft April 8, 2026 03:59
@ndgrigorian
ndgrigorianforce-pushed the use-meson-build branch 4 times, most recently from 1f7006a to e209e46CompareApril 8, 2026 06:35
@ndgrigorian
ndgrigorian marked this pull request as ready for review April 8, 2026 06:51
Base automatically changed from drop-removed-cbwr-constants to masterApril 8, 2026 17:17
CopilotAI review requested due to automatic review settings April 8, 2026 18:20

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates mkl-service from a setuptools/setup.py-driven build to a meson-python build, updating conda recipes and CI workflows accordingly, and adding an mkl runtime dependency.

Changes:

  • Remove setup.py and define extension builds/install layout in meson.build (C + Cython extensions, Python sources, tests).
  • Switch pyproject.toml build backend to mesonpy and add mkl to runtime dependencies.
  • Update conda recipes and GitHub Actions workflows to build/install via pip/python -m build instead of setup.py.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
setup.pyRemoved legacy setuptools build script.
pyproject.tomlSwitched build backend to mesonpy, updated build requirements and runtime deps.
meson.buildAdded Meson build definition for C/Cython extensions and installation layout.
mkl/_py_mkl_service.pyxAdded/introduced Cython wrapper implementation used by the public API.
conda-recipe/meta.yamlUpdated conda build requirements for Meson-based builds.
conda-recipe/build.shUpdated wheel build/install flow (no setup.py).
conda-recipe/bld.batRemoved setup.py clean step and MKLROOT usage.
conda-recipe-cf/meta.yamlUpdated conda-forge recipe host requirements for Meson-based builds.
conda-recipe-cf/build.shSwitched to pip install . build/install flow.
conda-recipe-cf/bld.batSwitched to pip install . build/install flow.
.github/workflows/build-with-standard-clang.ymlNew CI job building with system clang.
.github/workflows/build-with-clang.ymlUpdated IntelLLVM clang CI job to Meson-based install.
.github/workflows/build_pip.ymlNew CI job testing editable install + (pre-)release NumPy in conda env.

Comment threadpyproject.toml
Comment threadmeson.build Outdated
Comment threadmeson.build
Comment thread.github/workflows/build-with-standard-clang.yml Outdated
Comment thread.github/workflows/build-with-standard-clang.yml Outdated
Comment thread.github/workflows/build-with-clang.yml Outdated
Comment thread.github/workflows/build_pip.yml Outdated
@ndgrigorian
ndgrigorianforce-pushed the use-meson-build branch 3 times, most recently from b3cd7c9 to 3fb7affCompareApril 11, 2026 03:05
Comment threadmeson.build
Comment threadmkl/_py_mkl_service.pyx
Comment threadmeson.build
Comment threadconda-recipe-cf/meta.yaml
Comment threadconda-recipe/meta.yaml
Comment threadmeson.build
Comment threadmeson.build Outdated
Comment thread.github/workflows/build-with-standard-clang.yml Outdated
Comment threadpyproject.toml
Comment threadmeson.build Outdated
Comment threadpyproject.toml Outdated
Comment thread.github/workflows/build_pip.yml Outdated
Comment thread.github/copilot-instructions.md Outdated
Comment threadmkl/AGENTS.md Outdated
Comment threadmkl/AGENTS.md Outdated
Comment threadAGENTS.md Outdated
Comment thread.github/workflows/build_pip.yml Outdated
Comment thread.github/copilot-instructions.md Outdated
Comment threadAGENTS.md Outdated
Comment threadAGENTS.md Outdated
Comment threadAGENTS.md Outdated
Comment threadconda-recipe-cf/meta.yaml Outdated
Comment threadconda-recipe/meta.yaml Outdated
Comment threadconda-recipe-cf/meta.yaml Outdated
Comment threadmeson.build
Comment threadmeson.build Outdated
Comment threadmkl/AGENTS.md
Comment threadREADME.md Outdated

@jharlow-inteljharlow-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.

Everything is good, but small README change request

@antonwolfy

Copy link
Copy Markdown
Collaborator

@jharlow-intel, please let me know if you have more comments

Comment threadmeson.build Outdated
@vlad-perevezentsev

Copy link
Copy Markdown
Collaborator

No more comments from my side
LGTM
Thank you @ndgrigorian@antonwolfy

Comment threadconda-recipe/bld.bat

@jharlow-inteljharlow-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.

This looks good to me! Only question is to keep python 3.10 support in or not but it'll be easy to pluck out later if we have to

…er than
`install_rpath`. Meson rewrites `install_rpath` at install time (and the value
is further mangled by conda-build relocation), which leaves published wheels
without a working `$ORIGIN` entry. Passing `-Wl,-rpath,...` directly writes the
RPATH into the binary verbatim -- matching the legacy setuptools behaviour --
so the wheel locates the MKL runtime without any post-build tooling.
…ntentionally doesn't emit a standalone wheel (conda-forge distributes conda packages, not wheels)
@antonwolfy
antonwolfy merged commit 48b89c8 into masterJul 21, 2026
86 checks passed
@antonwolfy
antonwolfy deleted the use-meson-build branch July 21, 2026 14:49
Sign up for freeto 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.

5 participants

@ndgrigorian@antonwolfy@vlad-perevezentsev@jharlow-intel