Skip to content

Commit

Permalink
sage --package dependencies: Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Feb 21, 2024
1 parent 5109a5e commit cce885f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
15 changes: 8 additions & 7 deletions build/sage_bootstrap/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 14 additions & 3 deletions build/sage_bootstrap/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""


Expand Down

0 comments on commit cce885f

Please sign in to comment.