Commit bb462aaa authored by Jérôme Ortais's avatar Jérôme Ortais
Browse files

Mises à jour pour Pyromaths en ligne

parent a69c4873
...@@ -64,7 +64,7 @@ else: ...@@ -64,7 +64,7 @@ else:
VERSION = '18.6.2' VERSION = '18.6.2'
COPYRIGHT_YEAR = strftime('%Y') COPYRIGHT_YEAR = strftime('%Y')
COPYRIGHTS = _(u'© 2006 – %s Jérôme Ortais<br/>\n' \ COPYRIGHTS = (u'© 2006 – %s Jérôme Ortais<br/>\n' \
u'<span style=" font-size:small;">Pyromaths est distribué sous ' \ u'<span style=" font-size:small;">Pyromaths est distribué sous ' \
u'licence GPL.</span>') % (COPYRIGHT_YEAR) u'licence GPL.</span>') % (COPYRIGHT_YEAR)
WEBSITE = 'http://www.pyromaths.org/' WEBSITE = 'http://www.pyromaths.org/'
......
...@@ -216,7 +216,7 @@ def creation(parametres): ...@@ -216,7 +216,7 @@ def creation(parametres):
dir0 = os.path.dirname(exo) dir0 = os.path.dirname(exo)
dir1 = os.path.dirname(cor) dir1 = os.path.dirname(cor)
import socket import socket
if socket.gethostname() == "sd-27355.pyromaths.org": if socket.gethostname() == "sd-94439.pyromaths.org":
# Chemin complet pour Pyromaths en ligne car pas d'accents # Chemin complet pour Pyromaths en ligne car pas d'accents
f0noext = os.path.splitext(exo)[0].encode(sys.getfilesystemencoding()) f0noext = os.path.splitext(exo)[0].encode(sys.getfilesystemencoding())
f1noext = os.path.splitext(cor)[0].encode(sys.getfilesystemencoding()) f1noext = os.path.splitext(cor)[0].encode(sys.getfilesystemencoding())
...@@ -232,8 +232,8 @@ def creation(parametres): ...@@ -232,8 +232,8 @@ def creation(parametres):
os.chdir(dir0) os.chdir(dir0)
latexmkrc(f0noext) latexmkrc(f0noext)
log = open('%s-pyromaths.log' % f0noext, 'w') log = open('%s-pyromaths.log' % f0noext, 'w')
if socket.gethostname() == "sd-27355.pyromaths.org": if socket.gethostname() == "sd-94439.pyromaths.org":
os.environ['PATH'] += os.pathsep + "/usr/local/texlive/2014/bin/x86_64-linux" os.environ['PATH'] += os.pathsep + "/usr/local/texlive/2016/bin/x86_64-linux"
call(["latexmk", "-shell-escape", "-silent", "-interaction=nonstopmode", "-output-directory=%s" % dir0, "-pdfps", "%s.tex" % f0noext], env=os.environ, stdout=log) call(["latexmk", "-shell-escape", "-silent", "-interaction=nonstopmode", "-output-directory=%s" % dir0, "-pdfps", "%s.tex" % f0noext], env=os.environ, stdout=log)
call(["latexmk", "-c", "-silent", "-output-directory=%s" % dir0], env=os.environ, stdout=log) call(["latexmk", "-c", "-silent", "-output-directory=%s" % dir0], env=os.environ, stdout=log)
elif os.name == 'nt': elif os.name == 'nt':
...@@ -256,8 +256,8 @@ def creation(parametres): ...@@ -256,8 +256,8 @@ def creation(parametres):
os.chdir(dir1) os.chdir(dir1)
latexmkrc(f1noext) latexmkrc(f1noext)
log = open('%s-pyromaths.log' % f1noext, 'w') log = open('%s-pyromaths.log' % f1noext, 'w')
if socket.gethostname() == "sd-27355.pyromaths.org": if socket.gethostname() == "sd-94439.pyromaths.org":
os.environ['PATH'] += os.pathsep + "/usr/local/texlive/2014/bin/x86_64-linux" os.environ['PATH'] += os.pathsep + "/usr/local/texlive/2016/bin/x86_64-linux"
call(["latexmk", "-shell-escape", "-silent", "-interaction=nonstopmode", "-output-directory=%s" % dir1, "-pdfps", "%s.tex" % f1noext], env=os.environ, stdout=log) call(["latexmk", "-shell-escape", "-silent", "-interaction=nonstopmode", "-output-directory=%s" % dir1, "-pdfps", "%s.tex" % f1noext], env=os.environ, stdout=log)
call(["latexmk", "-c", "-silent", "-output-directory=%s" % dir1], env=os.environ, stdout=log) call(["latexmk", "-c", "-silent", "-output-directory=%s" % dir1], env=os.environ, stdout=log)
elif os.name == 'nt': elif os.name == 'nt':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment