@@ -25,6 +25,57 @@ The highlights of this release are: |
25 | 25 |
|
26 | 26 | The Python versions supported in this release are 3.9-3.12. |
27 | 27 |
|
| 28 | +Build system changes |
| 29 | +==================== |
| 30 | + |
| 31 | +In this release, NumPy has switched to Meson as the build system and |
| 32 | +meson-python as the build backend. Installing NumPy or building a wheel can be |
| 33 | +done with standard tools like ``pip`` and ``pypa/build``. The following are |
| 34 | +supported: |
| 35 | + |
| 36 | +- Regular installs: ``pip install numpy`` or (in a cloned repo) |
| 37 | + ``pip install .`` |
| 38 | +- Building a wheel: ``python -m build`` (preferred), or ``pip wheel .`` |
| 39 | +- Editable installs: ``pip install -e . --no-build-isolation`` |
| 40 | +- Development builds through the custom CLI implemented with |
| 41 | + `spin <https://github.com/scientific-python/spin>`__: ``spin build``. |
| 42 | + |
| 43 | +All the regular ``pip`` and ``pypa/build`` flags (e.g., |
| 44 | +``--no-build-isolation``) should work as expected. |
| 45 | + |
| 46 | +NumPy-specific build customization |
| 47 | +---------------------------------- |
| 48 | + |
| 49 | +Many of the NumPy-specific ways of customizing builds have changed. |
| 50 | +The ``NPY_*`` environment variables which control BLAS/LAPACK, SIMD, threading, |
| 51 | +and other such options are no longer supported, nor is a ``site.cfg`` file to |
| 52 | +select BLAS and LAPACK. Instead, there are command-line flags that can be |
| 53 | +passed to the build via ``pip``/``build``'s config-settings interface. These |
| 54 | +flags are all listed in the ``meson_options.txt`` file in the root of the repo. |
| 55 | +Detailed documented will be available before the final 1.26.0 release; for now |
| 56 | +please see `the SciPy "building from source" docs |
| 57 | +<http://scipy.github.io/devdocs/building/index.html>`__ since most build |
| 58 | +customization works in an almost identical way in SciPy as it does in NumPy. |
| 59 | + |
| 60 | +Build dependencies |
| 61 | +------------------ |
| 62 | + |
| 63 | +While the runtime dependencies of NumPy have not changed, the build |
| 64 | +dependencies have. Because we temporarily vendor Meson and meson-python, |
| 65 | +there are several new dependencies - please see the ``[build-system]`` section |
| 66 | +of ``pyproject.toml`` for details. |
| 67 | + |
| 68 | +Troubleshooting |
| 69 | +--------------- |
| 70 | + |
| 71 | +This build system change is quite large. In case of unexpected issues, it is |
| 72 | +still possible to use a ``setup.py``-based build as a temporary workaround (on |
| 73 | +Python 3.9-3.11, not 3.12), by copying ``pyproject.toml.setuppy`` to |
| 74 | +``pyproject.toml``. However, please open an issue with details on the NumPy |
| 75 | +issue tracker. We aim to phase out ``setup.py`` builds as soon as possible, and |
| 76 | +therefore would like to see all potential blockers surfaced early on in the |
| 77 | +1.26.0 release cycle. |
| 78 | + |
28 | 79 | Contributors |
29 | 80 | ============ |
30 | 81 |
|
|