| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| Build system ported to Meson | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The build system of Matplotlib has been ported from setuptools to `meson-python | ||
| <https://meson-python.readthedocs.io>`_ and `Meson <https://mesonbuild.com>`_. | ||
| Consequently, there have been a few changes for development and packaging purposes. | ||
|
|
||
| 1. Installation by ``pip`` of packages with ``pyproject.toml`` use `build isolation | ||
|
Comment thread
greglucas marked this conversation as resolved.
|
||
| <https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/#build-isolation>`_ | ||
| by default, which interferes with editable installation. Thus for developers using | ||
| editable installs, it is now necessary to pass the ``--no-build-isolation`` flag to | ||
| ``pip install``. This means that all build-time requirements must be available in the | ||
| environment for an editable install. | ||
| 2. Build configuration has moved from a custom :file:`mplsetup.cfg` (also configurable | ||
| via ``MPLSETUP`` environment variable) to Meson options. These may be specified using | ||
| `meson-python's build config settings | ||
| <https://meson-python.readthedocs.io/en/stable/how-to-guides/config-settings.html>`_ | ||
| for ``setup-args``. See :file:`meson_options.txt` for all options. For example, a | ||
| :file:`mplsetup.cfg` containing the following:: | ||
|
|
||
| [rc_options] | ||
| backend=Agg | ||
|
|
||
| [libs] | ||
| system_qhull = True | ||
|
|
||
| may be replaced by passing the following arguments to ``pip``:: | ||
|
|
||
| --config-settings=setup-args="-DrcParams-backend=Agg" \ | ||
| --config-settings=setup-args="-Dsystem-qhull=true" | ||
|
|
||
| Note that you must use ``pip`` >= 23.1 in order to pass more than one setting. | ||
| 3. Relatedly, Meson's `builtin options <https://mesonbuild.com/Builtin-options.html>`_ | ||
| are now used instead of custom options, e.g., the LTO option is now ``b_lto``. | ||
| 4. On Windows, Meson activates a Visual Studio environment automatically. However, it | ||
| will not do so if another compiler is available. See `Meson's documentation | ||
| <https://mesonbuild.com/Builtin-options.html#details-for-vsenv>`_ if you wish to | ||
| change the priority of chosen compilers. | ||
| 5. Installation of test data was previously controlled by :file:`mplsetup.cfg`, but has | ||
| now been moved to Meson's install tags. To install test data, add the ``tests`` | ||
| tag to the requested install (be sure to include the existing tags as below):: | ||
|
|
||
| --config-settings=install-args="--tags=data,python-runtime,runtime,tests" | ||
| 6. Checking typing stubs with ``stubtest`` does not work easily with editable install. | ||
| For the time being, we suggest using a normal (non-editable) install if you wish to | ||
| run ``stubtest``. | ||
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNote that in the long commit message of e5e0e2f, it was noted that system freetype/qhull were just for quicker testing and should probably have been reverted, so I have not carried that over to here.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.