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

Skip to content

Commit 753bed2

Browse files
committed
fixes from reviewers, failed CI, reshuffle FreeType section
1 parent 1bf4450 commit 753bed2

3 files changed

Lines changed: 23 additions & 33 deletions

File tree

doc/devel/contributing.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ use to organize this information.
4545

4646
Thank you for your help in keeping bug reports complete, targeted and descriptive.
4747

48+
.. _installing_for_devs:
49+
4850
Retrieving and installing the latest version of the code
4951
========================================================
5052

@@ -84,17 +86,28 @@ you can use ``git@`` instead of ``https://``, which works through the ssh proto
8486
and might be easier to use if you are using 2-factor authentication.
8587

8688

87-
To make sure the tests run locally you must build against the correct version
88-
of freetype. To configure the build system to fetch and build it either export
89-
the env ``MPLLOCALFREETYPE`` as::
89+
Building matplotlib for image comparison tests
90+
----------------------------------------------
9091

91-
export MPLLOCALFREETYPE=1
92+
Matplotlib's test suite makes heavy use of image comparison tests,
93+
meaning the result of a plot is compared against a known good result.
94+
Unfortunately, different versions of FreeType produce differently
95+
formed characters, causing these image comparisons to fail. To make
96+
them reproducible, matplotlib can be built with a special local copy
97+
of FreeType. This is recommended for all matplotlib developers.
9298

93-
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain
94-
::
99+
Copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain::
95100

96101
[test]
97102
local_freetype = True
103+
tests = True
104+
105+
or set the ``MPLLOCALFREETYPE`` environmental variable to any true
106+
value.
107+
108+
109+
Install matplotlib in developer mode
110+
------------------------------------
98111

99112
To install Matplotlib (and compile the c-extensions) run the following
100113
command from the top-level directory ::

doc/devel/testing.rst

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ infrastructure are in :mod:`matplotlib.testing`.
2121
Requirements
2222
------------
2323

24-
We strongly recommend developing new features in a seperate virtualenv.
25-
26-
Install all the Matplotlib dependencies_, and install matplotlib into the
27-
virtualenv with ``pip install -e matplotlib`` (but note the changes needed to
28-
``setup.cfg`` below) which will allow you to edit the code without
29-
reinstalling.
24+
Install the latest version of Matplotlib as documented in
25+
:ref:`installing_for_devs` In particular, follow the instructions to use a
26+
local FreeType build
3027

3128
The following software is required to run the tests:
3229

@@ -43,26 +40,6 @@ Optionally you can install:
4340
- pytest-xdist_ to run tests in parallel
4441

4542

46-
Building matplotlib for image comparison tests
47-
----------------------------------------------
48-
49-
matplotlib's test suite makes heavy use of image comparison tests,
50-
meaning the result of a plot is compared against a known good result.
51-
Unfortunately, different versions of FreeType produce differently
52-
formed characters, causing these image comparisons to fail. To make
53-
them reproducible, matplotlib can be built with a special local copy
54-
of FreeType. This is recommended for all matplotlib developers.
55-
56-
Add the following content to a ``setup.cfg`` file at the root of the
57-
matplotlib source directory::
58-
59-
[test]
60-
local_freetype = True
61-
tests = True
62-
63-
or by setting the ``MPLLOCALFREETYPE`` environmental variable to any true
64-
value.
65-
6643
Running the tests
6744
-----------------
6845

setupext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ def do_custom_build(self):
11871187
else:
11881188
break
11891189
else:
1190-
raise IOError("Failed to download freetype. "
1190+
raise IOError("Failed to download freetype. "
11911191
"You can download the file by "
11921192
"alternative means and copy it "
11931193
" to '{0}'".format(tarball_path))

0 commit comments

Comments
 (0)