8000 Merge pull request #7779 from tacaswell/API_DOC_backport_no_imag_build · matplotlib/matplotlib@be4b213 · GitHub
[go: up one dir, main page]

Skip to content

Commit be4b213

Browse files
authored
Merge pull request #7779 from tacaswell/API_DOC_backport_no_imag_build
Api doc backport no imag build
2 parents e764e0f + ca6bb75 commit be4b213

File tree

6 files changed

+35
-12
lines changed

6 files changed

+35
-12
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ install:
116116
cp .travis/setup.cfg .
117117
fi;
118118
119-
- python setup.py install
119+
- pip install -ve ./
120120
- |
121121
122122
script:

doc/api/api_changes.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ replaced by ``nipy_spectral`` and ``nipy_spectral_r`` since matplotlib
201201
raised a warning. As of matplotlib 2.0.0, using the old names raises a
202202
deprecation warning. In the future, using the old names will raise an error.
203203

204+
Default install no longer includes test images
205+
----------------------------------------------
206+
207+
To reduce the size of wheels and source installs, the tests and
208+
baseline images are no longer included by default.
209+
210+
To restore installing the tests and images, use a `setup.cfg` with ::
211+
212+
[packages]
213+
tests = True
214+
toolkit_tests = True
215+
216+
in the source directory at build/install time.
217+
204218
Changes in 1.5.3
205219
================
206220

doc/devel/contributing.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ the env ``MPLLOCALFREETYPE`` as::
5050

5151
export MPLLOCALFREETYPE=1
5252

53-
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit to contain ::
53+
or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain ::
5454

5555
[test]
5656
local_freetype = True
@@ -80,9 +80,15 @@ Alternatively, if you do ::
8080

8181
all of the files will be copied to the installation directory however,
8282
you will have to rerun this command every time the source is changed.
83+
Additionally you will need to copy :file:`setup.cfg.template` to
84+
:file:`setup.cfg` and edit it to contain ::
8385

86+
[test]
87+
local_freetype = True
88+
tests = True
8489

85-
You can then run the tests to check your work environment is set up properly::
90+
In either case you can then run the tests to check your work
91+
environment is set up properly::
8692

8793
python tests.py
8894

doc/devel/testing.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ matplotlib source directory::
4545

4646
[test]
4747
local_freetype = True
48+
tests = True
4849

4950
or by setting the ``MPLLOCALFREETYPE`` environmental variable to any true
5051
value.

setup.cfg.template

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Rename this file to setup.cfg to modify matplotlib's
1+
# Rename this file to setup.cfg to modify Matplotlib's
22
# build options.
33

44
[egg_info]
@@ -9,7 +9,7 @@
99
#basedirlist = /usr
1010

1111
[test]
12-
# If you plan to develop matplotlib and run or add to the test suite,
12+
# If you plan to develop Matplotlib and run or add to the test suite,
1313
# set this to True. It will download and build a specific version of
1414
# FreeType, and then use that to build the ft2font extension. This
1515
# ensures that test images are exactly reproducible.
@@ -21,11 +21,11 @@
2121
#suppress = False
2222

2323
[packages]
24-
# There are a number of subpackages of matplotlib that are considered
25-
# optional. They are all installed by default, but they may be turned
26-
# off here.
24+
# There are a number of subpackages of Matplotlib that are considered
25+
# optional. All except tests are installed by default, but that can
26+
# be changed here.
2727
#
28-
#tests = True
28+
#tests = False
2929
#sample_data = True
3030
#toolkits = True
3131
# Tests for the toolkits are only automatically installed
@@ -36,10 +36,10 @@
3636
# Matplotlib supports multiple GUI toolkits, including
3737
# GTK, MacOSX, Qt4, Qt5, Tk, and WX. Support for many of
3838
# these toolkits requires AGG, the Anti-Grain Geometry library,
39-
# which is provided by matplotlib and built by default.
39+
# which is provided by Matplotlib and built by default.
4040
#
4141
# Some backends are written in pure Python, and others require
42-
# extension code to be compiled. By default, matplotlib checks for
42+
# extension code to be compiled. By default, Matplotlib checks for
4343
# these GUI toolkits during installation and, if present, compiles the
4444
# required extensions to support the toolkit.
4545
#

setupext.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ class OptionalPackage(SetupPackage):
532532
optional = True
533533
force = False
534534
config_category = "packages"
535+
default_config = "auto"
535536

536537
@classmethod
537538
def get_config(cls):
@@ -541,7 +542,7 @@ def get_config(cls):
541542
insensitively defined as 1, true, yes, on for True) or opted-out (case
542543
insensitively defined as 0, false, no, off for False).
543544
"""
544-
conf = "auto"
545+
conf = cls.default_config
545546
if config is not None and config.has_option(cls.config_category, cls.name):
546547
try:
547548
conf = config.getboolean(cls.config_category, cls.name)
@@ -712,6 +713,7 @@ def get_namespace_packages(self):
712713
class Tests(OptionalPackage):
713714
name = "tests"
714715
nose_min_version = '0.11.1'
716+
default_config = False
715717

716718
def check(self):
717719
super(Tests, self).check()

0 commit comments

Comments
 (0)
0