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

Skip to content

Commit da439c0

Browse files
committed
By default, don't include tests in binary distributions.
Before this patch: $ ls -lh dist total 65M -rw-r--r-- 1 vagrant vagrant 32M Jan 6 22:56 matplotlib-2.0.0rc2+2914.g1fa4dd7-cp27-cp27mu-linux_x86_64.whl -rw-r--r-- 1 vagrant vagrant 33M Jan 6 22:53 matplotlib-2.0.0rc2+2914.g1fa4dd7.tar.gz With this patch: $ ls -lh dist total 43M -rw-r--r-- 1 vagrant vagrant 11M Jan 6 23:03 matplotlib-2.0.0rc2+2914.g1fa4dd7.dirty-cp27-cp27mu-linux_x86_64.whl -rw-r--r-- 1 vagrant vagrant 33M Jan 6 23:02 matplotlib-2.0.0rc2+2914.g1fa4dd7.dirty.tar.gz
1 parent 1fa4dd7 commit da439c0

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)