Skip to content

By default, don't include tests in binary distributions. #7757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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