|
@ -6,7 +6,7 @@ import glob |
|
|
import logging |
|
|
import logging |
|
|
import threading |
|
|
import threading |
|
|
import os.path |
|
|
import os.path |
|
|
from subprocess import Popen, PIPE, call |
|
|
from subprocess import Popen, PIPE, call, check_call |
|
|
|
|
|
|
|
|
from patacrep import __DATADIR__, authors, content, errors, files |
|
|
from patacrep import __DATADIR__, authors, content, errors, files |
|
|
from patacrep.index import process_sxd |
|
|
from patacrep.index import process_sxd |
|
@ -219,26 +219,25 @@ class SongbookBuilder(object): |
|
|
|
|
|
|
|
|
compiler = "lualatex" |
|
|
compiler = "lualatex" |
|
|
|
|
|
|
|
|
# test if the LaTeX compiler is accessible |
|
|
# Test if the LaTeX compiler is accessible |
|
|
try: |
|
|
try: |
|
|
process = Popen( |
|
|
check_call( |
|
|
[compiler, "--version"], |
|
|
[compiler, "--version"], |
|
|
stdin=PIPE, |
|
|
stdin=PIPE, |
|
|
stdout=PIPE, |
|
|
stdout=PIPE, |
|
|
stderr=PIPE, |
|
|
stderr=PIPE, |
|
|
env=os.environ, |
|
|
|
|
|
universal_newlines=True, |
|
|
universal_newlines=True, |
|
|
) |
|
|
) |
|
|
except Exception as error: |
|
|
except Exception as error: |
|
|
raise errors.ExecutableNotFound(compiler) |
|
|
raise errors.ExecutableNotFound(compiler) |
|
|
|
|
|
|
|
|
|
|
|
# Perform compilation |
|
|
try: |
|
|
try: |
|
|
process = Popen( |
|
|
process = Popen( |
|
|
[compiler] + self._lualatex_options + [self.basename], |
|
|
[compiler] + self._lualatex_options + [self.basename], |
|
|
stdin=PIPE, |
|
|
stdin=PIPE, |
|
|
stdout=PIPE, |
|
|
stdout=PIPE, |
|
|
stderr=PIPE, |
|
|
stderr=PIPE, |
|
|
env=os.environ, |
|
|
|
|
|
universal_newlines=True, |
|
|
universal_newlines=True, |
|
|
) |
|
|
) |
|
|
except Exception as error: |
|
|
except Exception as error: |
|
|