8000 Merge pull request #14673 from anntzer/setupprint · matplotlib/matplotlib@66628cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 66628cc

Browse files
authored
Merge pull request #14673 from anntzer/setupprint
BLD: More shortening of setup.py prints.
2 parents 98855b8 + 5a775a8 commit 66628cc

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

setup.py

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@
4949
__version__ = versioneer.get_version()
5050

5151

52-
# These are the packages in the order we want to display them. This
53-
# list may contain strings to create section headers for the display.
52+
# These are the packages in the order we want to display them.
5453
mpl_packages = [
55-
'Building Matplotlib',
5654
setupext.Matplotlib(),
5755
setupext.Python(),
5856
setupext.Platform(),
@@ -67,10 +65,8 @@
6765
setupext.Contour(),
6866
setupext.QhullWrap(),
6967
setupext.Tri(),
70-
'Optional subpackages',
7168
setupext.SampleData(),
7269
setupext.Tests(),
73-
'Optional backend extensions',
7470
setupext.BackendAgg(),
7571
setupext.BackendTkAgg(),
7672
setupext.BackendMacOSX(),
@@ -178,29 +174,23 @@ def run(self):
178174
print_raw()
179175
print_raw("Edit setup.cfg to change the build options; "
180176
"suppress output with --quiet.")
177+
print_raw()
178+
print_raw("BUILDING MATPLOTLIB")
181179

182180
good_packages = []
183181
for package in mpl_packages:
184-
if isinstance(package, str):
185-
print_raw('')
186-
print_raw(package.upper())
182+
try:
183+
result = package.check()
184+
if result is not None:
185+
print_status(package.name, 'yes [%s]' % result)
186+
except setupext.CheckFailed as e:
187+
print_status(package.name, 'no [%s]' % str(e))
188+
if not package.optional:
189+
sys.exit("Failed to build %s" % package.name)
187190
else:
188-
try:
189-
result = package.check()
190-
if result is not None:
191-
message = 'yes [%s]' % result
192-
print_status(package.name, message)
193-
except setupext.CheckFailed as e:
194-
msg = str(e).strip()
195-
if len(msg):
196-
print_status(package.name, 'no [%s]' % msg)
197-
else:
198-
print_status(package.name, 'no')
199-
if not package.optional:
200-
sys.exit("Failed to build %s" % package.name)
201-
else:
202-
good_packages.append(package)
203-
print_raw('')
191+
good_packages.append(package)
192+
193+
print_raw()
204194

205195
# Now collect all of the information we need to build all of the
206196
# packages.

0 commit comments

Comments
 (0)
0