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: diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index ca523a94ad72..0d603d0a9703 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 no longer includes test images +---------------------------------------------- + +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, use 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..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 @@ -80,9 +80,15 @@ Alternatively, if you do :: 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 it 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. diff --git a/setup.cfg.template b/setup.cfg.template index e64a9248111f..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,11 +21,11 @@ #suppress = False [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. +# 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. # -#tests = True +#tests = False #sample_data = True #toolkits = True # Tests for the toolkits are only automatically installed @@ -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. # 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()