Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added info for getting compilation output from meson on autorebuild #27053

New issue

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

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def _check_dependencies():
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
'xarray': ('https://docs.xarray.dev/en/stable/', None),
'meson-python': ('https://meson-python.readthedocs.io/en/stable/', None)
}


Expand Down
25 changes: 19 additions & 6 deletions doc/devel/development_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,25 @@ command ::

The 'editable/develop mode' builds everything and places links in your Python environment
so that Python will be able to import Matplotlib from your development source directory.
This allows you to import your modified version of Matplotlib without re-installing after
every change. Note that before the merging of the `Meson port
<https://github.com/matplotlib/matplotlib/pull/26621>`_, this is only true for ``*.py``
files. If you change the C-extension source based on a commit before the change to the
Meson build system (which might also happen if you change branches), you will have to
re-run the above command.
This allows you to import your modified version of Matplotlib without having to
re-install after changing a ``.py`` or compiled extension file.

When working on a branch that does not have Meson enabled, meaning it does not
have :ghpull:`26621` in its history (log), you will have to reinstall from source
each time you change any compiled extension code.

Build options
-------------
If you are working heavily with files that need to be compiled, you may want to
inspect the compilation log. This can be enabled by setting the environment
variable :envvar:`MESONPY_EDITABLE_VERBOSE` or by setting the ``editable-verbose``
config during installation ::

python -m pip install --no-build-isolation --config-settings=editable-verbose=true --editable .

For more information on installation and other configuration options, see the
Meson Python :external+meson-python:ref:`editable installs guide <how-to-guides-editable-installs>`.


Verify the Installation
=======================
Expand Down
20 changes: 20 additions & 0 deletions doc/devel/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,23 @@ unlink this file. Multiple versions of Matplotlib can be linked to the same DLL,
for example a development version installed in a development conda environment
and a stable version running in a Jupyter notebook. To resolve this error, fully
close all running instances of Matplotlib.

Windows compilation errors
==========================
If the compiled extensions are not building on Windows due to errors in linking to
Windows' header files, for example ``../../src/_tkagg.cpp:133:10: error: 'WM_DPICHANGED' was not declared in this scope``,
you should check which compiler Meson is using:

.. code-block:: bat

Build type: native build
Project name: matplotlib
Project version: 3.9.0.dev0
C compiler for the host machine: cc (gcc 7.2.0 "cc (Rev1, Built by MSYS2 project) 7.2.0")
C linker for the host machine: cc ld.bfd 2.29.1
C++ compiler for the host machine: c++ (gcc 7.2.0 "c++ (Rev1, Built by MSYS2 project) 7.2.0")
C++ linker for the host machine: c++ ld.bfd 2.29.1

Our :ref:`dependencies <dependencies>` documentation lists the minimum header
version if you intended to use ``MSYS2``. If you intended to use ``MSVC`` then
you may need to force Meson to :external+meson-python:ref:`use MSVC <vsenv-example>`.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,7 @@ ignore_messages = [
"Hyperlink target \".*\" is not referenced.",
"Duplicate implicit target name: \".*\".",
"Duplicate explicit target name: \".*\".",
# sphinx.ext.intersphinx directives
"No role entry for \"external+.*\".",
"Unknown interpreted text role \"external+.*\"."
]