Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 50cee65

Browse filesBrowse files
committed
Remove [status] suppress from setup.cfg.
distutils/setuptools already has a --quiet option, we can just use that instead of having to parse an option from setup.cfg.
1 parent 63d96d2 commit 50cee65
Copy full SHA for 50cee65

File tree

Expand file treeCollapse file tree

3 files changed

+19
-28
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+19
-28
lines changed

‎setup.cfg.template

Copy file name to clipboardExpand all lines: setup.cfg.template
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
# ensures that test images are exactly reproducible.
1111
#local_freetype = False
1212

13-
[status]
14-
# To suppress display of the dependencies and their versions
15-
# at the top of the build log, uncomment the following line:
16-
#suppress = True
17-
1813
[packages]
1914
# There are a number of subpackages of Matplotlib that are considered
2015
# optional. All except tests are installed by default, but that can

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def run(self):
177177
# Go through all of the packages and figure out which ones we are
178178
# going to build/install.
179179
print_line()
180-
print_raw("Edit setup.cfg to change the build options")
180+
print_raw("Edit setup.cfg to change the build options; "
181+
"suppress output with --quiet.")
181182

182183
required_failed = []
183184
good_packages = []

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+17-22Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ def write_cache(local_fn, data):
143143

144144
# matplotlib build options, which can be altered using setup.cfg
145145
options = {
146-
'display_status': True,
147146
'backend': None,
148147
}
149148

@@ -153,9 +152,6 @@ def write_cache(local_fn, data):
153152
config = configparser.ConfigParser()
154153
config.read(setup_cfg)
155154

156-
if config.has_option('status', 'suppress'):
157-
options['display_status'] = not config.getboolean("status", "suppress")
158-
159155
if config.has_option('rc_options', 'backend'):
160156
options['backend'] = config.get("rc_options", "backend")
161157

@@ -168,31 +164,30 @@ def write_cache(local_fn, data):
168164
options['local_freetype'] = lft or options.get('local_freetype', False)
169165

170166

171-
# Define the display functions only if display_status is True.
172-
if options['display_status']:
173-
def print_line(char='='):
174-
print(char * 80)
167+
if '-q' in sys.argv or '--quiet' in sys.argv:
168+
def print_raw(*args, **kwargs): pass # Suppress our own output.
169+
else:
170+
print_raw = print
171+
172+
173+
def print_line(char='='):
174+
print_raw(char * 80)
175+
175176

176-
def print_status(package, status):
177-
initial_indent = "%12s: " % package
178-
indent = ' ' * 18
179-
print(textwrap.fill(str(status), width=80,
177+
def print_status(package, status):
178+
initial_indent = "%12s: " % package
179+
indent = ' ' * 18
180+
print_raw(textwrap.fill(str(status), width=80,
180181
initial_indent=initial_indent,
181182
subsequent_indent=indent))
182183

183-
def print_message(message):
184-
indent = ' ' * 18 + "* "
185-
print(textwrap.fill(str(message), width=80,
184+
185+
def print_message(message):
186+
indent = ' ' * 18 + "* "
187+
print_raw(textwrap.fill(str(message), width=80,
186188
initial_indent=indent,
187189
subsequent_indent=indent))
188190

189-
def print_raw(section):
190-
print(section)
191-
else:
192-
def print_line(*args, **kwargs):
193-
pass
194-
print_status = print_message = print_raw = print_line
195-
196191

197192
def get_buffer_hash(fd):
198193
BLOCKSIZE = 1 << 16

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.