Welcome to Centmin Mod Community
Register Now

Xenforo Fonttools installation for using it in Font Awesome Manager addon

Discussion in 'Forum software usage' started by Dnyan, Jun 14, 2021.

  1. Dnyan

    Dnyan Member

    105
    23
    18
    Sep 16, 2017
    Ratings:
    +34
    Local Time:
    11:26 PM
    1.17.8
    10.3.22
    I am writing this tutorial kind of post just to make help of myself in future in cases if i mess with something.


    Font Awesome Manager addon can be found at below link
    Beta - Font Awesome Manager

    First do install python 3, the instructions are well written in below article

    Sysadmin - CentOS 7 Python 2.7 will reach the end of its life on January 1st, 2020

    In case if your server GCC version is below 8 or get error while making

    make changes to below command given in above article for python installation.

    Code:
    if [[ "$(nproc)" -le '2' ]]; then time ./configure --prefix=/opt/python${python_prefixver} --with-openssl=/usr; else time ./configure --enable-optimizations --prefix=/opt/python${python_prefixver} --with-openssl=/usr; fi
    do remove

    --enable-optimizations


    so it will be

    Code:
    if [[ "$(nproc)" -le '2' ]]; then time ./configure --prefix=/opt/python${python_prefixver} --with-openssl=/usr; else time ./configure --prefix=/opt/python${python_prefixver} --with-openssl=/usr; fi
    Then do install Fonttools with following command

    Code:
    pip3 install fonttools[woff]
    Once you installed the fonttools
    Simple path to pyftsubset in above case of installation
    /home/python_projects/myproject/bin/pyftsubset

    now you can use pyftsubset in FAM.
     
  2. eva2000

    eva2000 Administrator Staff Member

    46,976
    10,645
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,524
    Local Time:
    3:56 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    FYI, you should be fine with just using Python 3.6 supported side by side with Python 2.7 on CentOS 7

    Just run the python 3.6 installer addon for Centmin Mod
    Code (Text):
    /usr/local/src/centminmod/addons/python36_install.sh

    Then you can call that version of pip via pip3.6 command
    Code (Text):
    pip3.6 install -U pip
    pip3.6 install fonttools
    pip3.6 install fonttools[woff]
    

    Code (Text):
     pip3.6 install fonttools
    WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
    Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
    To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
    Collecting fonttools
      Downloading fonttools-4.24.4-py3-none-any.whl (854 kB)
         |████████████████████████████████| 854 kB 19.9 MB/s
    Installing collected packages: fonttools
    Successfully installed fonttools-4.24.4
    WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
    

    Code (Text):
    pip3.6 install fonttools[woff]
    WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
    Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
    To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
    Requirement already satisfied: fonttools[woff] in /usr/local/lib/python3.6/site-packages (4.24.4)
    Collecting brotli>=1.0.1
      Downloading Brotli-1.0.9-cp36-cp36m-manylinux1_x86_64.whl (357 kB)
         |████████████████████████████████| 357 kB 13.3 MB/s
    Collecting zopfli>=0.1.4
      Downloading zopfli-0.1.8-cp36-cp36m-manylinux1_x86_64.whl (41 kB)
         |████████████████████████████████| 41 kB 1.6 MB/s
    Installing collected packages: zopfli, brotli
    Successfully installed brotli-1.0.9 zopfli-0.1.8
    WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
    

    FYI, the old script wrapper message is just telling you to change from
    Code (Text):
    pip3.6 install fonttools
    pip3.6 install fonttools[woff]
    

    to
    Code (Text):
    python3.6 -m pip install fonttools
    python3.6 -m pip install fonttools[woff]