(todo=None)
| 206 | |
| 207 | |
| 208 | def check_prerequisites(todo=None): |
| 209 | if sys.version_info < (3, 4): |
| 210 | sys.exit("Script requires Python v3.4 or later") |
| 211 | try: |
| 212 | gpg_ver = run("gpg --version").splitlines()[0] |
| 213 | except: |
| 214 | sys.exit("You will need gpg installed") |
| 215 | if not 'GPG_TTY' in os.environ: |
| 216 | print("WARNING: GPG_TTY environment variable is not set, GPG signing may not work correctly (try 'export GPG_TTY=$(tty)'") |
| 217 | if not 'JAVA11_HOME' in os.environ: |
| 218 | sys.exit("Please set environment variables JAVA11_HOME") |
| 219 | try: |
| 220 | asciidoc_ver = run("asciidoctor -V").splitlines()[0] |
| 221 | except: |
| 222 | asciidoc_ver = "" |
| 223 | print("WARNING: In order to export asciidoc version to HTML, you will need asciidoctor installed") |
| 224 | try: |
| 225 | git_ver = run("git --version").splitlines()[0] |
| 226 | except: |
| 227 | sys.exit("You will need git installed") |
| 228 | try: |
| 229 | run("svn --version").splitlines()[0] |
| 230 | except: |
| 231 | sys.exit("You will need svn installed") |
| 232 | if not 'EDITOR' in os.environ: |
| 233 | print("WARNING: Environment variable $EDITOR not set, using %s" % get_editor()) |
| 234 | |
| 235 | if todo: |
| 236 | print("%s\n%s\n%s\n" % (gpg_ver, asciidoc_ver, git_ver)) |
| 237 | return True |
| 238 | |
| 239 | |
| 240 | epoch = datetime.fromtimestamp(0, UTC) |
no test coverage detected
searching dependent graphs…