Skip to content

Commit

Permalink
Merge pull request matplotlib#7757 from StephanErb/packaging_size
Browse files Browse the repository at this point in the history
By default, don't include tests in binary distributions.
  • Loading branch information
dopplershift authored Jan 7, 2017
2 parents cdb098f + da439c0 commit 92ba3c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions setup.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ class OptionalPackage(SetupPackage):
optional = True
force = False
config_category = "packages"
default_config = "auto"

@classmethod
def get_config(cls):
Expand All @@ -613,7 +614,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)
Expand Down Expand Up @@ -788,6 +789,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()
Expand Down

0 comments on commit 92ba3c5

Please sign in to comment.