conf.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import subprocess, os, sys
00004 def sh(command):
00005     print("+ {}".format(command))
00006     print(subprocess.check_output(command, shell=True))
00007 
00008 # install latex2html
00009 sh("mkdir -p tmp")
00010 sh("apt-get download libnetpbm10")
00011 sh("dpkg-deb -x libnetpbm10_*.deb tmp")
00012 sh("apt-get download netpbm")
00013 sh("dpkg-deb -x netpbm_*.deb tmp")
00014 sh("apt-get download latex2html")
00015 sh("dpkg-deb -x latex2html_*.deb tmp")
00016 sh("cd tmp/usr/share/latex2html; ln -sf ../../../etc/latex2html.conf l2hconf.pm")
00017 
00018 sh("sed -i 's@PERL /usr@PERL {}/tmp/usr@' tmp/etc/latex2html.conf".format(os.getcwd()))
00019 sh("sed -i 's@/usr/bin/pnm@{}/tmp/usr/bin/pnm@' tmp/etc/latex2html.conf".format(os.getcwd()))
00020 sh("sed -i 's@/usr/bin/pnm@{}/tmp/usr/bin/pnm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
00021 sh("sed -i 's@/usr/bin/ppm@{}/tmp/usr/bin/ppm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
00022 sh("sed -i 's@/usr/bin/pbm@{}/tmp/usr/bin/pbm@' tmp/usr/bin/pstoimg".format(os.getcwd()))
00023 
00024 # run make html
00025 sh("export CURDIR=`pwd`; cd ../latex/; LATEX2HTMLDIR=$CURDIR/tmp/usr/share/latex2html LERL5LIB=$LATEX2HTMLDIR LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CURDIR/tmp/usr/lib/ PATH=$PATH:$CURDIR/tmp/usr/bin/ make html")
00026 sh("export CURDIR=`pwd`; cd ../jlatex/; LATEX2HTMLDIR=$CURDIR/tmp/usr/share/latex2html LERL5LIB=$LATEX2HTMLDIR LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CURDIR/tmp/usr/lib/ PATH=$PATH:$CURDIR/tmp/usr/bin/ make html")
00027 
00028 # copy result to docs and _build/html
00029 sh("cd ../../; ln -sf doc/html docs")
00030 sh("cp * _build/html/; echo 'ok'")
00031 
00032 # custom settings conf.py
00033 master_doc = 'index'
00034 


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 18:05:53