Move build system to meson-python#303
Open
ndgrigorian wants to merge 12 commits intodrop-mkl-service-dependencyfrom
Open
Move build system to meson-python#303ndgrigorian wants to merge 12 commits intodrop-mkl-service-dependencyfrom
meson-python#303ndgrigorian wants to merge 12 commits intodrop-mkl-service-dependencyfrom
Conversation
fd5d163 to
182445d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates mkl_fft’s build backend from setuptools/setup.py to meson-python, moving extension/module build logic into meson.build and updating packaging/CI/conda recipes accordingly.
Changes:
- Switch PEP 517 build backend to
mesonpyand dropsetup.py-based build configuration. - Add a Meson build definition that generates
mklfft.cand builds/installs the_pydftiextension plus Python sources/tests. - Update conda recipes and CI workflows to install Meson-based build dependencies and build via
pip.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Removed legacy setuptools build script. |
| pyproject.toml | Switched build backend to mesonpy; adjusted formatter/lint tool config and removed setuptools-specific sections. |
| meson.build | New Meson build: MKL dependency discovery, source generation, Cython extension build, and install rules. |
| conda-recipe/meta.yaml | Add Meson build tooling to host requirements; remove setuptools. |
| conda-recipe/build.sh | Build/install via pip without setting MKLROOT. |
| conda-recipe/bld.bat | Build/install via pip without setting MKLROOT. |
| conda-recipe-cf/meta.yaml | Same as Intel recipe for conda-forge context. |
| conda-recipe-cf/build.sh | Build/install via pip instead of setup.py. |
| conda-recipe-cf/bld.bat | Build/install via pip instead of setup.py. |
| .github/workflows/build-with-standard-clang.yml | New CI job validating Meson-based builds with system clang. |
| .github/workflows/build-with-clang.yml | Update dependency installation to Meson-based toolchain (workflow still uses editable install later). |
| .github/workflows/build_pip.yml | Update dependency installation to Meson-based toolchain (workflow still uses editable install). |
| .flake8 | Exclude new vendored helper script. |
| _vendored/README.md | Document additional vendored script origin. |
| _vendored/process_src_template.py | New vendored CLI for generating *.c from *.c.src. |
| _vendored/conv_template.py | Formatting/modernization changes to vendored tempita processor. |
Comments suppressed due to low confidence (1)
.github/workflows/build_pip.yml:49
- This workflow still installs the package in editable mode (pip install -e ...), but build-with-standard-clang.yml explicitly notes that mkl_fft cannot be installed in editable mode. If editable installs are indeed unsupported with the meson-python backend, switch this workflow to a non-editable install (pip install .) and run tests from outside the repo checkout (e.g., cd ..) to ensure imports come from the installed wheel. If editable installs are intended to be supported, please drop/adjust the comment in build-with-standard-clang.yml and ensure meson-python minimum version is set accordingly.
d321b0d to
1f244f9
Compare
antonwolfy
reviewed
Apr 9, 2026
| - python | ||
| - python-gil # [py>=314] | ||
| - mkl-service | ||
| - {{ pin_compatible('mkl') }} |
Collaborator
There was a problem hiding this comment.
The log points to missing dependency on openmp:
WARNING (mkl_fft,lib/python3.14/site-packages/mkl_fft/_pydfti.cpython-314-x86_64-linux-gnu.so): Needed DSO lib/libiomp5.so found in ['https://software.repos.intel.com/python/conda/linux-64::intel-openmp==2025.3.3=intel_30']
WARNING (mkl_fft,lib/python3.14/site-packages/mkl_fft/_pydfti.cpython-314-x86_64-linux-gnu.so): .. but ['https://software.repos.intel.com/python/conda/linux-64::intel-openmp==2025.3.3=intel_30'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)| - python | ||
| - python-gil # [py>=314] | ||
| - mkl-service | ||
| - {{ pin_compatible('mkl') }} |
Collaborator
There was a problem hiding this comment.
The log points to missing dependency on openmp:
WARNING (mkl_fft,lib/python3.14/site-packages/mkl_fft/_pydfti.cpython-314-x86_64-linux-gnu.so): Needed DSO lib/libomp.so found in ['conda-forge/linux-64::llvm-openmp==22.1.2=h4922eb0_0']
WARNING (mkl_fft,lib/python3.14/site-packages/mkl_fft/_pydfti.cpython-314-x86_64-linux-gnu.so): .. but ['conda-forge/linux-64::llvm-openmp==22.1.2=h4922eb0_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)b81ce0e to
05fd5be
Compare
2aaa278 to
619eff1
Compare
aaf2822 to
81767b3
Compare
we search for MKL with cmake. Also drop pkg-config from meta.yamls and use cmake
619eff1 to
ef44173
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes moving from
setuptoolstomeson-pythonas themkl_fftbuild systemmeson-pythonis already used by NumPy and allowssetup.pyto be removed (with its logic moved into themeson.buildscript)Also moves to
mklas dependency, withmkl-serviceonly used as a dependency when using the scipy interface. If scipy is installed without mkl-service, the scipy interface won't be available