Skip to content

Commit

Permalink
Revert "Assume standard Python3/pip3 install of docutils (#610)"
Browse files Browse the repository at this point in the history
This reverts commit 31bfe43.

Turns out that on some RHEL8 machines, 'rst2thml' is installed, but not
'rst2html.py'.  For example, for the hpws machines at SNL, /usr/bin/rst2html
is installed with version:

  $ rst2html --version
  rst2html (Docutils 0.14, Python 3.6.8, on linux)

So this logic looking for 'rst2thml' and 'rst2html.py' is still useful.
  • Loading branch information
bartlettroscoe committed Oct 9, 2024
1 parent 3c1e866 commit 701bb48
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tribits/python_utils/GenerateDocUtilsOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ def generateFile(filePath, generateCmnd, outFile=None, workingDir="",

def addCmndLineOptions(clp):

# Assume standard install of docutils with Python3
rst2html = "rst2html.py"
rst2latex = "rst2latex.py"
# Find the right default for the current system
rst2html = "rst2html"
rst2latex = "rst2latex"
rst2htmlWhich = getCmndOutput("which rst2html", True, False)
if rst2htmlWhich == "" or re.match(".+no rst2html.+", rst2htmlWhich):
rst2html = rst2html+".py"
rst2latex = rst2latex+".py"

clp.add_option(
"--file-base", dest="fileBase", type="string",
Expand Down

0 comments on commit 701bb48

Please sign in to comment.