|
49 | 49 | __version__ = versioneer.get_version()
|
50 | 50 |
|
51 | 51 |
|
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. |
54 | 53 | mpl_packages = [
|
55 |
| - 'Building Matplotlib', |
56 | 54 | setupext.Matplotlib(),
|
57 | 55 | setupext.Python(),
|
58 | 56 | setupext.Platform(),
|
|
67 | 65 | setupext.Contour(),
|
68 | 66 | setupext.QhullWrap(),
|
69 | 67 | setupext.Tri(),
|
70 |
| - 'Optional subpackages', |
71 | 68 | setupext.SampleData(),
|
72 | 69 | setupext.Tests(),
|
73 |
| - 'Optional backend extensions', |
74 | 70 | setupext.BackendAgg(),
|
75 | 71 | setupext.BackendTkAgg(),
|
76 | 72 | setupext.BackendMacOSX(),
|
@@ -178,29 +174,23 @@ def run(self):
|
178 | 174 | print_raw()
|
179 | 175 | print_raw("Edit setup.cfg to change the build options; "
|
180 | 176 | "suppress output with --quiet.")
|
| 177 | + print_raw() |
| 178 | + print_raw("BUILDING MATPLOTLIB") |
181 | 179 |
|
182 | 180 | good_packages = []
|
183 | 181 | 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) |
187 | 190 | 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() |
204 | 194 |
|
205 | 195 | # Now collect all of the information we need to build all of the
|
206 | 196 | # packages.
|
|
0 commit comments