From cce885f5e639b373f45a658a78b5dd0ec464fd12 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 20 Feb 2024 21:44:09 -0800 Subject: [PATCH] sage --package dependencies: Fix indentation --- build/sage_bootstrap/app.py | 15 ++++++++------- build/sage_bootstrap/cmdline.py | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/build/sage_bootstrap/app.py b/build/sage_bootstrap/app.py index 070704f9499..978753352e5 100644 --- a/build/sage_bootstrap/app.py +++ b/build/sage_bootstrap/app.py @@ -133,27 +133,28 @@ def dependencies(self, *package_classes, **kwds): else: raise ValueError('format must be one of "plain", "rst", and "shell"') - if format == 'plain': - indent1 = " " - indent2 = " " - elif format == 'rst': - indent1 = "" - indent2 = " " - for package_name in pc.names: package = Package(package_name) if len(pc.names) > 1: if format == 'plain': print("{0}:".format(package_name)) + indent1 = " " elif format == 'rst': print("\n{0}\n{1}\n".format(package_name, "~" * len(package_name))) + indent1 = "" + else: + indent1 = "" for typeset in typesets: if len(typesets) > 1: if format == 'plain': print(indent1 + "{0}: ".format('/'.join(typeset))) + indent2 = indent1 + " " elif format == 'rst': print("\n" + indent1 + ".. tab:: {0}\n".format('/'.join(typeset))) + indent2 = indent1 + " " + else: + indent2 = indent1 deps = [] for t in typeset: diff --git a/build/sage_bootstrap/cmdline.py b/build/sage_bootstrap/cmdline.py index 35618b41bd8..7575d0d3706 100644 --- a/build/sage_bootstrap/cmdline.py +++ b/build/sage_bootstrap/cmdline.py @@ -109,12 +109,23 @@ $ sage --package dependencies maxima openblas maxima: - - ecl - - info + - ecl + - info openblas: - - gfortran + - gfortran $ sage --package dependencies maxima --runtime + - ecl + + $ sage --package dependencies maxima openblas --runtime --order-only + maxima: + order_only: + - info + runtime: - ecl + openblas: + order_only: + runtime: + - gfortran """