Move build system to meson-python#303
Conversation
fd5d163 to
182445d
Compare
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
b81ce0e to
05fd5be
Compare
2aaa278 to
619eff1
Compare
aaf2822 to
81767b3
Compare
619eff1 to
ef44173
Compare
81767b3 to
a8169a5
Compare
5118b1d to
1ec3c0e
Compare
1ec3c0e to
2ab1e4a
Compare
|
The last commit is experimental 54edcb2 that switches |
|
@antonwolfy @jharlow-intel |
af95082 to
d11fbe4
Compare
| ) | ||
| SET "TEST_DEPENDENCIES=pytest" | ||
| conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} | ||
| } |
| modules: ['MKL::MKL'], | ||
| cmake_args: [ | ||
| '-DMKL_ARCH=intel64', | ||
| '-DMKL_LINK=dynamic', |
There was a problem hiding this comment.
I wonder why we use SDL here for mkl-service and SDL also in legacy mkl_fft. Is that intentional to migrate to dynamic link?
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