Python Modules

#### Beyond Linux® From Scratch (systemd Edition) - Version 9.0

### Chapter 13. Programming

- Prev

  Python-3.7.4

- Next

  Ruby-2.6.4

- Up
- Home

# Python Modules

## Introduction to Python Modules

The Python module packages add useful objects to the Python language. Modules utilized by packages throughout BLFS are listed here, along with their dependencies.

- D-Bus Python-1.2.8

- docutils-0.15

- PyAtSpi2-2.32.1

- PyCairo-1.18.1

- PyCrypto-2.6.1

- Pygments-2.4.2

- PyGObject-2.28.7

- PyGObject-3.32.2

- PyGTK-2.24.0

- PyXDG-0.25

- libxml2-2.9.9 (for Python2)

- lxml-4.4.1

- MarkupSafe-1.1.1

- Jinja2-2.10.1

- Mako-1.1.0

- Scour-0.37

- six-1.12.0

- PyYAML-5.1.2

## D-Bus Python-1.2.8

### Introduction to D-Bus Python Module

D-Bus Python provides Python bindings to the D-Bus.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.8.tar.gz

- Download MD5 sum: 7379db774c10904f27e7e2743d90fb43

- Download size: 772 KB

- Estimated disk space required: 11 MB (both versions, with tests)

- Estimated build time: 0.2 SBU (both versions, with tests)

#### D-Bus Python Dependencies

##### Required

dbus-1.12.16 and GLib-2.60.6

##### Recommended

Python-2.7.16 (some applications in the book require the Python 2 module)

##### Optional

tap.py (required for tests)

##### Optional (Required to build the API and HTML Documentation)

docutils-0.15 and Sphinx with sphinx_rtd_theme

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/dbus-python

### Installation of D-Bus Python

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build D-Bus Python as the Python 2 module, run the following commands:

    mkdir python2 &&
    pushd python2 &&
    PYTHON=/usr/bin/python2     \
    ../configure --prefix=/usr --docdir=/usr/share/doc/dbus-python-1.2.8 &&
    make &&
    popd

To test the results, issue: make -C python2 check. One test reports error due to dbus issues.

To build D-Bus Python as the Python 3 module, run the following commands:

    mkdir python3 &&
    pushd python3 &&
    PYTHON=/usr/bin/python3    \
    ../configure --prefix=/usr --docdir=/usr/share/doc/dbus-python-1.2.8 &&
    make &&
    popd

To test the results, issue: make -C python3 check.

To install the Python 2 module, run the following command as the `root` user:

    make -C python2 install

To install the Python 3 module, run the following command as the `root` user:

    make -C python3 install

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/share/doc/dbus-python-1.2.8 and /usr/lib/python2.7/site-packages/dbus and/or /usr/lib/python3.7/site-packages/dbus

## docutils-0.15

### Introduction to docutils

docutils is a set of Python modules and programs for processing plaintext docs into formats such as HTML, XML, or LaTeX.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://downloads.sourceforge.net/docutils/docutils-0.15.tar.gz

- Download MD5 sum: f51729f19e70a9dc4837433193a5e798

- Download size: 1.7 MB

- Estimated disk space required: 12 MB

- Estimated build time: 0.4 SBU

#### Docutils Dependencies

##### Optional

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/docutils

### Installation of docutils

To build the Python 3 applications, run the following command:

    python3 setup.py build

To install the Python applications run the following as the `root` user:

    python3 setup.py install --optimize=1 &&

    for f in /usr/bin/rst*.py; do
      ln -svf $(basename $f) /usr/bin/$(basename $f .py)
    done

### Contents

Installed Programs: rst2html4, rst2html5, rst2html, rst2latex, rst2man, rst2odt_prepstyles, rst2odt, rst2pseudoxml, rst2s5, rst2xetex, rst2xml, and rstpep2html
Installed Libraries: None
Installed Directories: /usr/lib/python3.7/site-packages/docutils

## PyAtSpi2-2.32.1

### Introduction to PyAtSpi2

The PyAtSpi2 package contains Python bindings for the core components of the GNOME Accessibility.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pyatspi/2.32/pyatspi-2.32.1.tar.xz

- Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pyatspi/2.32/pyatspi-2.32.1.tar.xz

- Download MD5 sum: 2351c6fb8062c1590d316747bb265aa3

- Download size: 304 KB

- Estimated disk space required: 3.0 MB

- Estimated build time: less than 0.1 SBU

#### PyAtSpi2 Dependencies

##### Required

PyGObject-3.32.2

##### Recommended

at-spi2-core-2.32.1

##### Optional

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pyatspi2

### Installation of PyAtSpi2

To build PyAtSpi2 as a Python 3 module, run the following commands:

    ./configure --prefix=/usr --with-python=/usr/bin/python3

This package does not come with a testsuite.

To install the Python 3 module, run the following command as the `root` user:

    make install

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python2.7/site-packages/pyatspi and/or /usr/lib/python3.7/site-packages/pyatspi

## PyCairo-1.18.1

### Introduction to PyCairo Module

PyCairo provides Python bindings to Cairo.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.18.1/pycairo-1.18.1.tar.gz

- Download MD5 sum: 7610da8a40a7bed548991aa3416431d1

- Download size: 196 KB

- Estimated disk space required: 5.8 MB

- Estimated build time: less than 0.1 SBU

#### PyCairo Dependencies

##### Required

Cairo-1.16.0

##### Recommended

Python-2.7.16 (PyGTK-2.24.0 can only use Python 2)

##### Optional

Hypothesis (for tests)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycairo

### Installation of PyCairo

Install PyCairo for Python2 and Python3 by running the following commands:

    python2 setup.py build &&
    python3 setup.py build

This package does not come with a test suite.

Now, as the `root` user:

    python2 setup.py install --optimize=1   &&
    python2 setup.py install_pycairo_header &&
    python2 setup.py install_pkgconfig      &&
    python3 setup.py install --optimize=1   &&
    python3 setup.py install_pycairo_header &&
    python3 setup.py install_pkgconfig

### Contents

Installed Programs: None
Installed Libraries: _cairo.so (python2) and _cairo.cpython-37m-x86_64-linux-gnu.so (python3)
Installed Directories: /usr/include/pycairo, /usr/lib/python2.7/site-packages/cairo /usr/lib/python2.7/site-packages/pycairo-1.18.1-py2.7.egg, /usr/lib/python3.7/site-packages/cairo , and /usr/lib/python3.7/site-packages/pycairo-1.18.1-py3.7.egg

## PyCrypto-2.6.1

### Introduction to the PyCrypto Module

PyCrypto is a collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.).

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz

- Download MD5 sum: 55a61a054aa66812daf5161a0d5d7eda

- Download size: 440 KB

- Estimated disk space required: 14 MB

- Estimated build time: 0.1 SBU

#### PyCrypto Dependencies

##### Recommended

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycrypto

### Installation of PyCrypto

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build the Python 2 and Python 3 modules, run the following commands:

    python2 setup.py build &&
    python3 setup.py build

To install both modules, run the following commands as the `root` user:

    python2 setup.py install --optimize=1 &&
    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: pycrypto-2.6.1-py2.7.egg-info and/or pycrypto-2.6.1-py3.7.egg-info
Installed Directories: /usr/lib/python2.7/site-packages/Crypto and/or /usr/lib/python3.7/site-packages/Crypto

## Pygments-2.4.2

### Introduction to Pygments Module

Pygments is a general syntax highlighter written in Python, for more than 300 languages.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-2.4.2.tar.gz

- Download MD5 sum: 5ecc3fbb2a783e917b369271fc0e6cd1

- Download size: 8.9 MB

- Estimated disk space required: 51 MB

- Estimated build time: less than 0.1 SBU

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygments

### Installation of Pygments

Build and install the Python 3 module by running the following commands as the `root` user:

    python3 setup.py install --optimize=1

### Contents

Installed Programs: pygmentize
Installed Library: None
Installed Directories: /usr/lib/python3.7/site-packages/Pygments-2.4.2-py3.7.egg

## PyGObject-2.28.7

### Introduction to PyGObject Module

PyGObject-2.28.7 provides Python 2 bindings to the GObject class from GLib.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.7.tar.xz

- Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.7.tar.xz

- Download MD5 sum: ae48b60c690c4aa894e69e0c97802745

- Download size: 728 KB

- Estimated disk space required: 17 MB

- Estimated build time: 0.1 SBU

#### PyGObject Dependencies

##### Required

GLib-2.60.6, PyCairo-1.18.1 (Python 2), and Python-2.7.16

##### Optional

gobject-introspection-1.60.2 and libxslt-1.1.33 (to Build Documentation)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygobject2

### Installation of PyGObject

Install PyGObject by running the following commands:

    ./configure --prefix=/usr --disable-introspection &&
    make

This package does not have a working testsuite.

Now, as the `root` user:

    make install

### Command Explanations

`--disable-introspection`: Omit this switch if you have installed gobject-introspection-1.60.2. Note that it conflicts with PyGObject-3.32.2.

`--disable-docs`: This option disables the rebuilding of the html documentation if libxslt-1.1.33 is installed.

### Contents

Installed Programs: pygobject-codegen-2.0
Installed Libraries: libpyglib-2.0-python.so, _gio.so, unix.so, _glib.so and _gobject.so.
Installed Directories: /usr/include/pygtk-2.0, /usr/lib/python2.7/site-packages/gtk-2.0/{gio,glib,gobject}, /usr/share/gtk-doc/html/pygobject and /usr/share/pygobject/2.0

## PyGObject-3.32.2

### Introduction to PyGObject3 Module

PyGObject3 provides Python bindings to the GObject class from GLib.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/3.32/pygobject-3.32.2.tar.xz

- Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/3.32/pygobject-3.32.2.tar.xz

- Download MD5 sum: 92ffa25351782feb96362f0dace2089f

- Download size: 540 KB

- Estimated disk space required: 28 MB

- Estimated build time: 0.5 SBU

#### PyGObject3 Dependencies

##### Required

gobject-introspection-1.60.2 and PyCairo-1.18.1 (Python 3 module)

##### Recommended

Python-2.7.16 and PyCairo-1.18.1 (Python 2 module)

##### Optional (for the tests)

pep8, pyflakes, and pytest

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygobject3

### Installation of PyGObject3

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build PyGObject3 as a Python 2 module, run the following commands:

    mkdir python2                        &&
    pushd python2                        &&
    meson --prefix=/usr -Dpython=python2 &&
    ninja                                &&
    popd

To test the results, issue: ninja -C python2 test. An already active graphical session with bus address is necessary to run the tests. Two tests fail due to a search for GTK+-4, which has not been released yet.

To build PyGObject3 as a Python 3 module, run the following commands:

    mkdir python3                        &&
    pushd python3                        &&
    meson --prefix=/usr -Dpython=python3 &&
    ninja                                &&
    popd

To test the results, issue: ninja -C python3 test. An already active graphical session with bus address is necessary to run the tests. Two tests fail due to a search for GTK+-4, which has not been released yet.

To install the Python 2 module, run the following command as the `root` user:

    ninja -C python2 install

To install the Python 3 module, run the following command as the `root` user:

    ninja -C python3 install

### Contents

Installed Programs: None
Installed Library: /usr/lib/python2.7/site-packages/gi/_gi{,_cairo}.so and/or /usr/lib/python3.7/site-packages/gi/_gi{,_cairo}.cpython-37m-<arch>-linux-gnu.so
Installed Directories: /usr/include/pygobject-3.0, and /usr/lib/python2.7/site-packages/{gi,pygtkcompat} and/or /usr/lib/python3.7/site-packages/{gi,pygtkcompat}

## PyGTK-2.24.0

### Introduction to PyGTK Module

PyGTK lets you to easily create programs with a graphical user interface using the Python programming language.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2

- Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2

- Download MD5 sum: a1051d5794fd7696d3c1af6422d17a49

- Download size: 2.2 MB

- Estimated disk space required: 83 MB

- Estimated build time: 0.7 SBU

#### PyGTK Dependencies

##### Required

PyGObject-2.28.7 and Python-2.7.16

##### Required (atk module)

ATK-2.32.0

##### Required (pango module)

Pango-1.42.4

##### Required (pangocairo module)

PyCairo-1.18.1 (Python 2) and Pango-1.42.4

##### Required (gtk and gtk.unixprint modules)

PyCairo-1.18.1 (Python 2) and GTK+-2.24.32.

##### Required (gtk.glade module)

PyCairo-1.18.1 (Python 2) and libglade-2.6.4.

##### Optional

NumPy

##### Optional (to Build Documentation)

libxslt-1.1.33

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygtk

### Installation of PyGTK

Install PyGTK by running the following commands:

    ./configure --prefix=/usr &&
    make

The tests must be run from an active X display. If this is so, issue: make check.

Now, as the `root` user:

    make install

### Command Explanations

`--enable-docs`: This option enables rebuilding the html documentation if libxslt-1.1.33 is installed.

### Contents

Installed Programs: pygtk-codegen-2.0 and pygtk-demo.
Installed Libraries: atk.so, _gtk.so, glade.so, gtkunixprint.so, pango.so and pangocairo.so.
Installed Directories: /usr/include/pygtk-2.0, /usr/lib/pygtk, /usr/lib/python2.7/site-packages/gtk-2.0, /usr/share/gtk-doc/html/pygtk and /usr/share/pygtk.

#### Short Descriptions

pygtk-codegen-2.0 | is a wrapper script to run the PyGTK codegen module.
pygtk-demo | is a Python wrapper to run the PyGTK demo program.

## PyXDG-0.25

### Introduction to PyXDG Module

PyXDG is a Python library to access freedesktop.org standards.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://people.freedesktop.org/~takluyver/pyxdg-0.25.tar.gz

- Download MD5 sum: bedcdb3a0ed85986d40044c87f23477c

- Download size: 48 KB

- Estimated disk space required: 800 KB

- Estimated build time: less than 0.1 SBU

#### PyXDG Dependencies

##### Optional

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pyxdg

### Installation of PyXDG

To install the module, run the following command as the `root` user:

    python3 setup.py install --optimize=1

### Contents

Installed Directory: /usr/lib/python3.7/site-packages/xdg

## libxml2-2.9.9 (for its Python2 module)

### Introduction to the libxml2 Python2 module

These instructions provide the Python2 bindings for libxml2: the Python3 bindings are built as part of libxml2-2.9.9 and most packages in the book do not use these bindings for the older Python2.

By building these bindings after libxml2-2.9.9 has been installed, there is no need to rebuild the time-consuming (if all dependencies are used) main part of that package.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://xmlsoft.org/sources/libxml2-2.9.9.tar.gz

- Download (FTP): ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz

- Download MD5 sum: c04a5a0a042eaa157e8e8c9eabe76bd6

- Download size: 5.2 MB

- Estimated disk space required: 54 MB (2.3 MB installed)

- Estimated build time: less than 0.1 SBU

#### libxml2 (Python2) Dependencies

##### Required

libxml2-2.9.9 and Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libxml2

### Installation of libxml2 Python2 module

To build the Python 2 module, run:

    cd python             &&
    python2 setup.py build

To install the Python 2 module, as the `root` user run:

    python2 setup.py install --optimize=1

### Contents

Installed Programs: drv_libxml2.py, libxml2.py
Installed Libraries: libxml2mod.so
Installed Directories: None

### Short Descriptions

drv_libxml2.py | is a SAX Python2 driver for libxml2.
libxml2.py | is the Python2 binding for libxml2.
`libxml2mod.so` | is the interface for Python2 to use `libxml2.so`.

## lxml-4.4.1

### Introduction to lxml

lxml provides Python bindings for libxslt-1.1.33 and libxml2-2.9.9.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/l/lxml/lxml-4.4.1.tar.gz

- Download MD5 sum: ce976a2d3c630d7fde86d3a4c3a1c606

- Download size: 4.3 MB

- Estimated disk space required: 213 MB (add 46 MB for the testsuites)

- Estimated build time: 2.3 SBU (add 2.2 SBU for the testsuites)

#### lxml Dependencies

##### Required

libxslt-1.1.33

##### Recommended

Python-2.7.16

##### Optional (to run more tests)

GDB-8.3, Valgrind-3.15.0, and cssselect

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/lxml

### Installation of lxml

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build both Python 2 and Python 3 modules, run:

    python2 setup.py build &&
    python3 setup.py build

If you wish to run the tests, enter: make PYTHON=python2 test and make PYTHON=python3 test. This will rebuild the package for inplace use before running the tests. Seven tests are known to fail due to a missing file.

To install both modules, issue the following commands as the `root` user:

    python2 setup.py install --optimize=1 &&
    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python2.7/site-packages/lxml, /usr/lib/python2.7/site-packages/lxml-4.4.1-py2.7-linux-$ARCH.egg-info and/or /usr/lib/python3.7/site-packages/lxml, /usr/lib/python3.7/site-packages/lxml-4.4.1-py3.7-linux-$ARCH.egg-info

## MarkupSafe-1.1.1

### Introduction to MarkupSafe Module

MarkupSafe is a Python module that implements a XML/HTML/XHTML Markup safe string.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-1.1.1.tar.gz

- Download MD5 sum: 43fd756864fe42063068e092e220c57b

- Download size: 20 KB

- Estimated disk space required: 412 KB

- Estimated build time: less than 0.1 SBU

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/MarkupSafe

### Installation of MarkupSafe

To build the module, run the following command:

    python3 setup.py build

To install the module, run the following command as the `root` user:

    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python3.7/site-packages/markupsafe and /usr/lib/python3.7/site-packages/MarkupSafe-1.1.1-py3.7.egg-info

## Jinja2-2.10.1

### Introduction to Jinja2 Module

Jinja2 is a Python module that implements a simple pythonic template language.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.10.1.tar.gz

- Download MD5 sum: 0ae535be40fd215a8114a090c8b68e5a

- Download size: 256 KB

- Estimated disk space required: 2.7 MB

- Estimated build time: less than 0.1 SBU

#### Jinja2 Dependencies

##### Required

MarkupSafe-1.1.1

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Jinja2

### Installation of Jinja2

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To install the Python 2 module, run the following command as the `root` user:

    python2 setup.py install --optimize=1

To install the Python 3 module, run the following command as the `root` user:

    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python2.7/site-packages/Jinja2, /usr/lib/python2.7/site-packages/Jinja2-2.10.1-py2.7.egg-info and/or /usr/lib/python3.7/site-packages/Jinja2, /usr/lib/python3.7/site-packages/Jinja2-2.10.1-py3.7.egg-info

## Mako-1.1.0

### Introduction to Mako Module

Mako is a Python module that implements hyperfast and lightweight templating for the Python platform.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.1.0.tar.gz

- Download MD5 sum: 6c3f2da0b74af529a4c4a537d0848bf2

- Download size: 456 KB

- Estimated disk space required: 3.1 MB

- Estimated build time: less than 0.1 SBU

#### Mako Dependencies

##### Required

MarkupSafe-1.1.1

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Mako

### Installation of Mako

To install the Python 3 module, run the following command as the `root` user:

    python3 setup.py install --optimize=1

### Contents

Installed Programs: mako-render3
Installed Libraries: None
Installed Directories: /usr/lib/python3.7/site-packages/mako and /usr/lib/python3.7/site-packages/Mako-1.1.0-py3.7.egg-info

## PyYAML-5.1.2

### Introduction to PyYAML Module

PyYAML is a Python module that implements the next generation YAML parser and emitter.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): http://pyyaml.org/download/pyyaml/PyYAML-5.1.2.tar.gz

- Download MD5 sum: 20f87ab421b0271dbf371dc5c1cddb5c

- Download size: 260 KB

- Estimated disk space required: 13 MB

- Estimated build time: 0.1 SBU

#### PyYAML Dependencies

##### Required

libyaml-0.2.2

##### Optional

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/PyYAML

### Installation of PyYAML

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build both Python 2 and Python 3 modules, run the following commands:

    python2 setup.py build &&
    python3 setup.py build

To install both modules, run the following commands as the `root` user:

    python2 setup.py install --optimize=1 &&
    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: _yaml.so
Installed Directories: /usr/lib/python2.7/site-packages/yaml and/or /usr/lib/python3.7/site-packages/yaml

## Scour-0.37

### Introduction to Scour

Scour is an SVG (Scalable Vector Graphics) optimizer/cleaner that reduces their size by optimizing structure and removing unnecessary data.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://github.com/scour-project/scour/archive/v0.37/scour-0.37.tar.gz

- Download MD5 sum: 1de595a0b1627d47b01b4e5fa2976087

- Download size: 96 KB

- Estimated disk space required: 1.3 MB

- Estimated build time: less than 0.1 SBU

#### Scour Dependencies

##### Required

six-1.12.0 (will be automatically downloaded and installed if not already present)

##### Recommended

Python-2.7.16

### Note

The only use of Scour in this book is by applications which require Python2.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/scour

### Installation of scour

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

To build both Python 2 and Python 3 modules, run the following commands:

    python2 setup.py build &&
    python3 setup.py build

To partially test the results, issue: python2 testcss.py. If you have installed Six you can run the main tests by issuing: python2 testscour.py.

To install both modules, run the following command as the `root` user:

    python2 setup.py install --optimize=1 &&
    python3 setup.py install --optimize=1

### Contents

Installed Programs: scour
Installed Libraries: None
Installed Directories: None

### Short Descriptions

scour | is a program to optimize and clean SVG files.

## six-1.12.0

### Introduction to Six Module

Six is a Python 2 and 3 compatibility library.

This package is known to build and work properly using an LFS-9.0 platform.

#### Package Information

- Download (HTTP): https://files.pythonhosted.org/packages/source/s/six/six-1.12.0.tar.gz

- Download MD5 sum: 9ae5d1feed8c0215f4ae4adcd9207fcb

- Download size: 32 KB

- Estimated disk space required: 544 KB

- Estimated build time: less than 0.1 SBU

#### Six Dependencies

##### Recommended Dependencies

Python-2.7.16

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/six

### Installation of six

### Note

Both Python 2 and Python 3 modules can be built and installed without any conflicts.

Install six for Python 2 and Python 3 by running the following commands:

    python2 setup.py build &&
    python3 setup.py build

This package does not come with a test suite.

Now, as the `root` user:

    python2 setup.py install --optimize=1 &&
    python3 setup.py install --optimize=1

### Contents

Installed Programs: None
Installed Libraries: None
Installed Directories: /usr/lib/python2.7/site-packages/six-1.12.0-py2.7.egg and/or /usr/lib/python3.7/site-packages/six-1.12.0-py3.7.egg

Last updated on 2019-05-12 08:02:34 -0700

- Prev

  Python-3.7.4

- Next

  Ruby-2.6.4

- Up
- Home