From 5a775a875db37e8e9672cd9e0239b1b0bae636bc Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 2 Jul 2019 09:25:54 +0200 Subject: [PATCH] More shortening of setup.py prints. We don't really need to support "sections" in the packages list. This PR makes the output go from ``` BUILDING MATPLOTLIB matplotlib: yes [3.1.0+1287.g04d9d28b8] python: yes [3.7.3 (default, Jun 24 2019, 04:54:02) [GCC 9.1.0]] platform: yes [linux] OPTIONAL SUBPACKAGES sample_data: yes [installing] tests: no [skipping due to configuration] OPTIONAL BACKEND EXTENSIONS agg: yes [installing] tkagg: yes [installing; run-time loading from Python Tcl/Tk] macosx: no [Mac OS-X only] ``` to ``` BUILDING MATPLOTLIB matplotlib: yes [3.1.0+1287.g04d9d28b8.dirty] python: yes [3.7.3 (default, Jun 24 2019, 04:54:02) [GCC 9.1.0]] platform: yes [linux] sample_data: yes [installing] tests: no [skipping due to configuration] agg: yes [installing] tkagg: yes [installing; run-time loading from Python Tcl/Tk] macosx: no [Mac OS-X only] ``` (and note that the "agg" and "tkagg" entries are being removed by a separate PR, as they're not configurable anyways...) --- setup.py | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/setup.py b/setup.py index 4bb9ec6914cf..54b32bab84f6 100644 --- a/setup.py +++ b/setup.py @@ -49,10 +49,8 @@ __version__ = versioneer.get_version() -# These are the packages in the order we want to display them. This -# list may contain strings to create section headers for the display. +# These are the packages in the order we want to display them. mpl_packages = [ - 'Building Matplotlib', setupext.Matplotlib(), setupext.Python(), setupext.Platform(), @@ -67,10 +65,8 @@ setupext.Contour(), setupext.QhullWrap(), setupext.Tri(), - 'Optional subpackages', setupext.SampleData(), setupext.Tests(), - 'Optional backend extensions', setupext.BackendAgg(), setupext.BackendTkAgg(), setupext.BackendMacOSX(), @@ -178,29 +174,23 @@ def run(self): print_raw() print_raw("Edit setup.cfg to change the build options; " "suppress output with --quiet.") + print_raw() + print_raw("BUILDING MATPLOTLIB") good_packages = [] for package in mpl_packages: - if isinstance(package, str): - print_raw('') - print_raw(package.upper()) + try: + result = package.check() + if result is not None: + print_status(package.name, 'yes [%s]' % result) + except setupext.CheckFailed as e: + print_status(package.name, 'no [%s]' % str(e)) + if not package.optional: + sys.exit("Failed to build %s" % package.name) else: - try: - result = package.check() - if result is not None: - message = 'yes [%s]' % result - print_status(package.name, message) - except setupext.CheckFailed as e: - msg = str(e).strip() - if len(msg): - print_status(package.name, 'no [%s]' % msg) - else: - print_status(package.name, 'no') - if not package.optional: - sys.exit("Failed to build %s" % package.name) - else: - good_packages.append(package) - print_raw('') + good_packages.append(package) + + print_raw() # Now collect all of the information we need to build all of the # packages. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy