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

Skip to content

Commit 92ba3c5

Browse files
authored
Merge pull request #7757 from StephanErb/packaging_size
By default, don't include tests in binary distributions.
2 parents cdb098f + da439c0 commit 92ba3c5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

setup.cfg.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222

2323
[packages]
2424
# 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.
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

setupext.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ class OptionalPackage(SetupPackage):
604604
optional = True
605605
force = False
606606
config_category = "packages"
607+
default_config = "auto"
607608

608609
@classmethod
609610
def get_config(cls):
@@ -613,7 +614,7 @@ def get_config(cls):
613614
insensitively defined as 1, true, yes, on for True) or opted-out (case
614615
insensitively defined as 0, false, no, off for False).
615616
"""
616-
conf = "auto"
617+
conf = cls.default_config
617618
if config is not None and config.has_option(cls.config_category, cls.name):
618619
try:
619620
conf = config.getboolean(cls.config_category, cls.name)
@@ -788,6 +789,7 @@ def get_namespace_packages(self):
788789
class Tests(OptionalPackage):
789790
name = "tests"
790791
nose_min_version = '0.11.1'
792+
default_config = False
791793

792794
def check(self):
793795
super(Tests, self).check()

0 commit comments

Comments
 (0)