Skip to content

Move build system to meson-python#303

Open
ndgrigorian wants to merge 12 commits intodrop-mkl-service-dependencyfrom
use-meson-build
Open

Move build system to meson-python#303
ndgrigorian wants to merge 12 commits intodrop-mkl-service-dependencyfrom
use-meson-build

Conversation

@ndgrigorian
Copy link
Copy Markdown
Collaborator

@ndgrigorian ndgrigorian commented Apr 7, 2026

This PR proposes moving from setuptools to meson-python as the mkl_fft 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)

Also moves to mkl as dependency, with mkl-service only used as a dependency when using the scipy interface. If scipy is installed without mkl-service, the scipy interface won't be available

@ndgrigorian ndgrigorian force-pushed the use-meson-build branch 4 times, most recently from fd5d163 to 182445d Compare April 8, 2026 02:13
@ndgrigorian ndgrigorian marked this pull request as ready for review April 8, 2026 06:51
Copilot AI review requested due to automatic review settings April 8, 2026 06:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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_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 mesonpy and drop setup.py-based build configuration.
  • Add a Meson build definition that generates mklfft.c and builds/installs the _pydfti extension 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.

@ndgrigorian ndgrigorian force-pushed the use-meson-build branch 4 times, most recently from d321b0d to 1f244f9 Compare April 8, 2026 08:27
- python
- python-gil # [py>=314]
- mkl-service
- {{ pin_compatible('mkl') }}
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.

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') }}
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.

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)

@ndgrigorian ndgrigorian changed the base branch from master to drop-mkl-service-dependency April 9, 2026 21:26
@ndgrigorian ndgrigorian force-pushed the use-meson-build branch 3 times, most recently from 2aaa278 to 619eff1 Compare April 9, 2026 21:33
@ndgrigorian ndgrigorian force-pushed the drop-mkl-service-dependency branch from aaf2822 to 81767b3 Compare April 9, 2026 21:36
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.

3 participants