-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Migrate build system away from distutils (deprecated in NumPy)
NumPy has deprecated distutils, which our project currently relies on to compile a significant amount of Fortran code. This code links against LAPACK/BLAS libraries, but in some environments we also need to compile against Intel MKL instead.
To ensure long-term compatibility, automated builds, and portability, the build system should be migrated to a modern alternative such as CMake or Meson.
This task is self-contained: it does not require any knowledge of the scientific functionality, algorithms, or physics implemented in the code. The scope is strictly the build infrastructure.
✅ Requirements
- Replace the current
distutils-based build system with CMake or Meson. - Ensure compilation works with:
- LAPACK/BLAS backends (Linux, standard HPC clusters).
- Intel MKL (Intel compilers).
- Apple ARM (M1/M2) architecture (linking against Accelerate framework or equivalent BLAS/LAPACK libraries).
- Preserve automatic detection of available math libraries where possible.
- Update documentation with build instructions for the supported platforms.
🚀 Getting Started Checklist
-
Set up the environment
- Clone the repository and check out the build system files (
setup.py,distutilsconfigs, etc.). - Install dependencies (Fortran compiler, BLAS/LAPACK, MKL if available).
- Clone the repository and check out the build system files (
-
Choose a build system
- Decide whether to use CMake or Meson (both are acceptable).
- Initialize the new build system files (e.g.
CMakeLists.txtormeson.build).
-
Add Fortran sources
- Configure the build system to compile all existing Fortran files.
- Ensure that object files are correctly linked into the Python extension module(s).
-
Handle linear algebra libraries
- Add detection logic for:
- OpenBLAS/LAPACK (default).
- Intel MKL (on Intel compilers).
- Accelerate framework (macOS ARM).
- Add detection logic for:
-
Test the build
- Compile and install locally using the new build system.
- Run the test suite to confirm functionality is unchanged.
-
Update CI
- Modify the continuous integration workflow to use the new build system.
- Ensure CI covers Linux, Intel with MKL, and macOS ARM.
-
Documentation
- Update the README / installation guide with new build instructions.
💡 Why this is a good first issue
- No deep dive into algorithms or physics is needed — the challenge is purely build infrastructure.
- It improves portability and maintainability.
- It’s a great way to contribute without spending too much time learning the internals of the code.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers