From e83e108ef30e6c404c434e26faff940bb121831e Mon Sep 17 00:00:00 2001 From: Ryan May Date: Sat, 7 Jan 2017 15:31:46 -0700 Subject: [PATCH 1/4] Merge pull request #7757 from StephanErb/packaging_size By default, don't include tests in binary distributions. --- setup.cfg.template | 6 +++--- setupext.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.cfg.template b/setup.cfg.template index e64a9248111f..f9caa97b4606 100644 --- a/setup.cfg.template +++ b/setup.cfg.template @@ -22,10 +22,10 @@ [packages] # There are a number of subpackages of matplotlib that are considered -# optional. They are all installed by default, but they may be turned -# off here. +# optional. All except tests are installed by default, but that can +# be changed here. # -#tests = True +#tests = False #sample_data = True #toolkits = True # Tests for the toolkits are only automatically installed diff --git a/setupext.py b/setupext.py index fc1bc0cafabb..381963624725 100644 --- a/setupext.py +++ b/setupext.py @@ -532,6 +532,7 @@ class OptionalPackage(SetupPackage): optional = True force = False config_category = "packages" + default_config = "auto" @classmethod def get_config(cls): @@ -541,7 +542,7 @@ def get_config(cls): insensitively defined as 1, true, yes, on for True) or opted-out (case insensitively defined as 0, false, no, off for False). """ - conf = "auto" + conf = cls.default_config if config is not None and config.has_option(cls.config_category, cls.name): try: conf = config.getboolean(cls.config_category, cls.name) @@ -712,6 +713,7 @@ def get_namespace_packages(self): class Tests(OptionalPackage): name = "tests" nose_min_version = '0.11.1' + default_config = False def check(self): super(Tests, self).check() From e2e7235f6701529ea5d8f4528c8b179df6842d98 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 10 Jan 2017 00:29:31 -0500 Subject: [PATCH 2/4] DOC: API notes for not installing tests/baseline images by default Update to include details about how to re-enable. --- doc/api/api_changes.rst | 14 ++++++++++++++ doc/devel/contributing.rst | 9 +++++++-- doc/devel/testing.rst | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index ca523a94ad72..17b9d60c0081 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -201,6 +201,20 @@ replaced by ``nipy_spectral`` and ``nipy_spectral_r`` since matplotlib raised a warning. As of matplotlib 2.0.0, using the old names raises a deprecation warning. In the future, using the old names will raise an error. +Default install does not include test images +-------------------------------------------- + +To reduce the default size of wheels and source installs, the tests +and baseline images are no longer included by default. + +To restore installing the tests and images have a `setup.cfg` with :: + + [packages] + tests = True + toolkit_tests = True + +in the source directory at build/install time. + Changes in 1.5.3 ================ diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index 8ddb927db44f..7a6691deea8b 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -79,10 +79,15 @@ Alternatively, if you do :: pip install -v ./ all of the files will be copied to the installation directory however, -you will have to rerun this command every time the source is changed. +you will have to rerun this command every time the source is changed. Additionally you will +need to copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit to contain :: + [test] + local_freetype = True + tests = True -You can then run the tests to check your work environment is set up properly:: +In either case you can then run the tests to check your work +environment is set up properly:: python tests.py diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst index f08199810aa1..dc4cb8a65feb 100644 --- a/doc/devel/testing.rst +++ b/doc/devel/testing.rst @@ -45,6 +45,7 @@ matplotlib source directory:: [test] local_freetype = True + tests = True or by setting the ``MPLLOCALFREETYPE`` environmental variable to any true value. From 5ca204ddde4b6d8ca485de66b547a3158c6607db Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 11 Jan 2017 23:34:51 -0500 Subject: [PATCH 3/4] TST: source install so we find test images --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0354378dfc7a..369ec9acd3f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,7 +113,7 @@ install: cp .travis/setup.cfg . fi; - - python setup.py install + - pip install -ve ./ - | script: From ca6bb75e35f2b4a427142d0aa7007ca742cd9046 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 12 Jan 2017 22:51:04 -0500 Subject: [PATCH 4/4] DOC: minor doc tweaks --- doc/api/api_changes.rst | 10 +++++----- doc/devel/contributing.rst | 7 ++++--- setup.cfg.template | 10 +++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 17b9d60c0081..0d603d0a9703 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -201,13 +201,13 @@ replaced by ``nipy_spectral`` and ``nipy_spectral_r`` since matplotlib raised a warning. As of matplotlib 2.0.0, using the old names raises a deprecation warning. In the future, using the old names will raise an error. -Default install does not include test images --------------------------------------------- +Default install no longer includes test images +---------------------------------------------- -To reduce the default size of wheels and source installs, the tests -and baseline images are no longer included by default. +To reduce the size of wheels and source installs, the tests and +baseline images are no longer included by default. -To restore installing the tests and images have a `setup.cfg` with :: +To restore installing the tests and images, use a `setup.cfg` with :: [packages] tests = True diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index 7a6691deea8b..d9d1112e39fb 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -50,7 +50,7 @@ the env ``MPLLOCALFREETYPE`` as:: export MPLLOCALFREETYPE=1 -or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit to contain :: +or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain :: [test] local_freetype = True @@ -79,8 +79,9 @@ Alternatively, if you do :: pip install -v ./ all of the files will be copied to the installation directory however, -you will have to rerun this command every time the source is changed. Additionally you will -need to copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit to contain :: +you will have to rerun this command every time the source is changed. +Additionally you will need to copy :file:`setup.cfg.template` to +:file:`setup.cfg` and edit it to contain :: [test] local_freetype = True diff --git a/setup.cfg.template b/setup.cfg.template index f9caa97b4606..d2e7db4bd534 100644 --- a/setup.cfg.template +++ b/setup.cfg.template @@ -1,4 +1,4 @@ -# Rename this file to setup.cfg to modify matplotlib's +# Rename this file to setup.cfg to modify Matplotlib's # build options. [egg_info] @@ -9,7 +9,7 @@ #basedirlist = /usr [test] -# If you plan to develop matplotlib and run or add to the test suite, +# If you plan to develop Matplotlib and run or add to the test suite, # set this to True. It will download and build a specific version of # FreeType, and then use that to build the ft2font extension. This # ensures that test images are exactly reproducible. @@ -21,7 +21,7 @@ #suppress = False [packages] -# There are a number of subpackages of matplotlib that are considered +# There are a number of subpackages of Matplotlib that are considered # optional. All except tests are installed by default, but that can # be changed here. # @@ -36,10 +36,10 @@ # Matplotlib supports multiple GUI toolkits, including # GTK, MacOSX, Qt4, Qt5, Tk, and WX. Support for many of # these toolkits requires AGG, the Anti-Grain Geometry library, -# which is provided by matplotlib and built by default. +# which is provided by Matplotlib and built by default. # # Some backends are written in pure Python, and others require -# extension code to be compiled. By default, matplotlib checks for +# extension code to be compiled. By default, Matplotlib checks for # these GUI toolkits during installation and, if present, compiles the # required extensions to support the toolkit. # pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy