Mwlib

From SME Server
Revision as of 01:56, 23 June 2017 by Unnilennium (talk | contribs) (Created page with "{{WIP box}} this how-to is an help to install mediawiki libraries (mwlib) on SME 9 you will need pdftk from dag (this repo does not exist anymore so here a way to get the fi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Warning.png Work in Progress:
This page is a Work in Progress. The contents off this page may be in flux, please have a look at this page history the to see list of changes.


this how-to is an help to install mediawiki libraries (mwlib) on SME 9

you will need pdftk from dag (this repo does not exist anymore so here a way to get the files)

/sbin/e-smith/db yum_repositories set dag repository  Name 'Dag - EL6'  BaseURL 'http://www.mirrorservice.org/sites/apt.sw.be/redhat/el6/en/$basearch/dag'  EnableGroups no  GPGCheck yes  GPGKey https://www.mirrorservice.org/sites/apt.sw.be/RPM-GPG-KEY.dag.txt  Visible no  Exclude freetype,htop,iptraf,rsync,syslinux  status disabled
signal-event yum-modify
yum install pdftk --enablerepo=dag

add the repo epel

install compilation tools

yum install gcc gcc-c++ cpp make python-devel libjpeg-devel zlib-devel freetype-devel  lcms-devel libxslt-devel libxml2-devel git ocaml

install needed dependencies

yum install python-pip python-gevent python-py python-apipkg  ImageMagick texlive-latex texlive-texvc blahtexml --enablerepo=epel

pip install :

# apipkg provided in the repo is 1.4 and does not work with python 2.6
pip install  apipkg==1.2
# Pillow is required, but the version 4.0 has a syntax error when running with python 2.6
pip install -i http://pypi.pediapress.com/simple/ Pillow==3.4.2 --trusted-host pypi.pediapress.com
# last version fails with python 2.6
pip install -i http://pypi.pediapress.com/simple/ --trusted-host pypi.pediapress.com  pygments==1.6
pip install -i http://pypi.pediapress.com/simple/ mwlib mwlib.rl   pyfribidi --trusted-host pypi.pediapress.com

install texvc

cd ~ 
git clone https://github.com/pediapress/texvc
cd texvc; make; make install PREFIX=~/pp

ultimately, unless you upgrade to python 2.9 you will need a small hack on the PIL library :

vim /usr/lib64/python2.6/site-packages/PIL/Image.py

find

def tostring(self, *args, **kw): 
   raise Exception("tostring() has been removed. " + "Please use tobytes() instead.") 

and replace it with

def tostring(self): return self.tobytes()


Sources

  1. http://mwlib.readthedocs.io/en/latest/installation.html
  2. https://stackoverflow.com/questions/36592618/reportlab-image-to-pdf-please-call-tobytes