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

Skip to content

Commit b3d72d2

Browse files
story645ksundenQuLogic
committed
added info for getting compilation output from meson on autorebuild
added force MSVC to troubleshooting added meson-python to intersphinx Co-authored-by: Kyle Sunden <[email protected]> Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent 1d6f09f commit b3d72d2

File tree

4 files changed

+43
-6
lines changed

4 files changed

+43
-6
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def _check_dependencies():
207207
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
208208
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
209209
'xarray': ('https://docs.xarray.dev/en/stable/', None),
210+
'meson-python': ('https://meson-python.readthedocs.io/en/stable/', None)
210211
}
211212

212213

doc/devel/development_setup.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,25 @@ command ::
164164

165165
The 'editable/develop mode' builds everything and places links in your Python environment
166166
so that Python will be able to import Matplotlib from your development source directory.
167-
This allows you to import your modified version of Matplotlib without re-installing after
168-
every change. Note that before the merging of the `Meson port
169-
<https://github.com/matplotlib/matplotlib/pull/26621>`_, this is only true for ``*.py``
170-
files. If you change the C-extension source based on a commit before the change to the
171-
Meson build system (which might also happen if you change branches), you will have to
172-
re-run the above command.
167+
This allows you to import your modified version of Matplotlib without having to
168+
re-install after changing a ``.py`` or compiled extension file.
169+
170+
When working on a branch that does not have Meson enabled, meaning it does not
171+
have :ghpull:`26621` in its history (log), you will have to reinstall from source
172+
each time you change any compiled extension code.
173+
174+
Build options
175+
-------------
176+
If you are working heavily with files that need to be compiled, you may want to
177+
inspect the compilation log. This can be enabled by setting the environment
178+
variable :envvar:`MESONPY_EDITABLE_VERBOSE` or by setting the ``editable-verbose``
179+
config during installation ::
180+
181+
python -m pip install --no-build-isolation --config-settings=editable-verbose=true --editable .
182+
183+
For more information on installation and other configuration options, see the
184+
Meson Python :external+meson-python:ref:`editable installs guide <how-to-guides-editable-installs>`.
185+
173186

174187
Verify the Installation
175188
=======================

doc/devel/troubleshooting.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,23 @@ unlink this file. Multiple versions of Matplotlib can be linked to the same DLL,
4343
for example a development version installed in a development conda environment
4444
and a stable version running in a Jupyter notebook. To resolve this error, fully
4545
close all running instances of Matplotlib.
46+
47+
Window's compilation errors
48+
===========================
49+
If the C-extensions are not building on Windows due to errors in linking to
50+
Window's header files, for example ``../../src/_tkagg.cpp:133:10: error: 'WM_DPICHANGED' was not declared in this scope``,
51+
you should check which compiler Meson is using:
52+
53+
.. code-block:: bat
54+
55+
Build type: native build
56+
Project name: matplotlib
57+
Project version: 3.9.0.dev0
58+
C compiler for the host machine: cc (gcc 7.2.0 "cc (Rev1, Built by MSYS2 project) 7.2.0")
59+
C linker for the host machine: cc ld.bfd 2.29.1
60+
C++ compiler for the host machine: c++ (gcc 7.2.0 "c++ (Rev1, Built by MSYS2 project) 7.2.0")
61+
C++ linker for the host machine: c++ ld.bfd 2.29.1
62+
63+
Our :ref:`dependencies <dependencies>` documentation lists the minimum header
64+
version if you intended to use ``MSYS2``. If you intended to use ``MSVC`` you
65+
may need to :external+meson-python:ref:`force Meson to use MSVC <vsenv-example>`.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,7 @@ ignore_messages = [
287287
"Hyperlink target \".*\" is not referenced.",
288288
"Duplicate implicit target name: \".*\".",
289289
"Duplicate explicit target name: \".*\".",
290+
# sphinx.ext.intersphinx directives
291+
"No role entry for \"external+.*\".",
292+
"Unknown interpreted text role \"external+.*\"."
290293
]

0 commit comments

Comments
 (0)