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 provides Python bindings to the D-Bus.
This package is known to build and work properly using an LFS-8.4 platform.
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)
Python-2.7.15 (some applications in the book require the Python 2 module)
tap.py (required for tests)
docutils-0.14 and Sphinx with sphinx_rtd_theme
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/dbus-python
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/python \ ../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
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-8.4 platform.
Download (HTTP): http://downloads.sourceforge.net/docutils/docutils-0.14.tar.gz
Download MD5 sum: c53768d63db3873b7d452833553469de
Download size: 1.6 MB
Estimated disk space required: 17 MB
Estimated build time: 0.4 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/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
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-8.4 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pyatspi/2.30/pyatspi-2.30.0.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pyatspi/2.30/pyatspi-2.30.0.tar.xz
Download MD5 sum: 2b588e226bfce50669ed6466d8a2d3b4
Download size: 304 KB
Estimated disk space required: 3.6 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/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
PyCairo provides Python bindings to Cairo.
This package is known to build and work properly using an LFS-8.4 platform.
Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.18.0/pycairo-1.18.0.tar.gz
Download MD5 sum: 5ee1e07742b184f88505bd47569b5c2d
Download size: 197 KB
Estimated disk space required: 7.1 MB
Estimated build time: 0.1 SBU
Python-2.7.15 (PyGTK-2.24.0 can only use Python 2)
Hypothesis (for tests)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycairo
Install PyCairo for Python2 by running the following commands:
python2 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
Install PyCairo for Python3 by running the following commands:
python3 setup.py build
This package does not come with a test suite.
Now, as the root
user:
python3 setup.py install --optimize=1 && python3 setup.py install_pycairo_header && python3 setup.py install_pkgconfig
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-8.4 platform.
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
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycrypto
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
To build the Python 2 module, run the following command:
python setup.py build
To install the Python 2 module,
run the following command as the root
user:
python setup.py install --optimize=1
To build the Python 3 module, run the following command:
python3 setup.py build
To install the Python 3 module,
run the following command as the root
user:
python3 setup.py install --optimize=1
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-8.4 platform.
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
GLib-2.58.3, PyCairo-1.18.0 (Python 2), and Python-2.7.15
gobject-introspection-1.58.3 and libxslt-1.1.33 (to Build Documentation)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygobject2
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
--disable-introspection
: Omit this
switch if you have installed gobject-introspection-1.58.3.
Note that it conflicts with PyGObject-3.30.4.
--disable-docs
: This option disables
the rebuilding of the html documentation if libxslt-1.1.33 is
installed.
PyGObject3 provides Python bindings to the GObject class from GLib.
This package is known to build and work properly using an LFS-8.4 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/3.30/pygobject-3.30.4.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/3.30/pygobject-3.30.4.tar.xz
Download MD5 sum: d42f8ec30faa76a25f7d0afc88b4d822
Download size: 533 KB
Estimated disk space required: 14 MB
Estimated build time: 0.1 SBU
gobject-introspection-1.58.3 and PyCairo-1.18.0 (Python 3 module)
Python-2.7.15 and PyCairo-1.18.0 (Python 2 module)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygobject3
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.
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.
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
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-8.4 platform.
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
PyGObject-2.28.7 and Python-2.7.15
PyCairo-1.18.0 (Python 2) and Pango-1.42.4
PyCairo-1.18.0 (Python 2) and GTK+-2.24.32.
PyCairo-1.18.0 (Python 2) and libglade-2.6.4.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/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
--enable-docs
: This
option enables rebuilding the html documentation if libxslt-1.1.33 is installed.
PyXDG is a Python library to access freedesktop.org standards.
This package is known to build and work properly using an LFS-8.4 platform.
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
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pyxdg
To install the module, run the following command as the
root
user:
python3 setup.py install --optimize=1
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-8.4 platform.
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-2.9.9 and Python-2.7.15
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libxml2
To build the Python 2 module, run:
cd python && python setup.py build
To install the Python 2 module,
as the root
user run:
python setup.py install --optimize=1
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-8.4 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/l/lxml/lxml-4.3.1.tar.gz
Download MD5 sum: d2b2eb305bfa9ed15aebe61affb3ffa4
Download size: 4.2 MB
Estimated disk space required: 179 MB (add 39 MB for the testsuite)
Estimated build time: 1.9 SBU (add 1.7 SBU for the testsuite)
GDB-8.2.1, Valgrind-3.14.0, and cssselect
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/lxml
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
To build the Python 2 module, run:
python setup.py build
If you wish to run the tests, enter: make test. This will rebuild the package for inplace use before running the tests. One or more tests sometimes fail.
To install the Python 2 module,
as the root
user run:
python setup.py install --optimize=1
To build the Python 3 module, run:
python3 setup.py clean && python3 setup.py build
If you wish to run the tests, enter: make PYTHON=python3 test. This will rebuild the package for inplace use before running the tests. One or more tests sometimes fail.
To install the Python 3 module,
as the root
user run:
python3 setup.py install --optimize=1
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-8.4 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-1.1.0.tar.gz
Download MD5 sum: 49e3f3230cedb7ae34faf06913db83fc
Download size: 18 KB
Estimated disk space required: 548 KB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/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
Jinja2 is a Python module that implements a simple pythonic template language.
This package is known to build and work properly using an LFS-8.4 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.10.tar.gz
Download MD5 sum: 61ef1117f945486472850819b8d1eb3d
Download size: 256 KB
Estimated disk space required: 2.7 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Jinja2
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:
python 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
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-8.4 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.0.7.tar.gz
Download MD5 sum: 5836cc997b1b773ef389bf6629c30e65
Download size: 552 KB
Estimated disk space required: 3.6 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Mako
To install the Python 3 module,
run the following command as the root
user:
python3 setup.py install --optimize=1
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-8.4 platform.
Download (HTTP): http://pyyaml.org/download/pyyaml/PyYAML-3.13.tar.gz
Download MD5 sum: b78b96636d68ac581c0e2f38158c224f
Download size: 268 KB
Estimated disk space required: 12 MB
Estimated build time: 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/PyYAML
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
To build the Python 2 module, run the following command:
python setup.py build
To install the Python 2 module,
run the following command as the root
user:
python setup.py install --optimize=1
To build the Python 3 module, run the following command:
python3 setup.py build
To install the Python 3 module,
run the following command as the root
user:
python3 setup.py install --optimize=1
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-8.4 platform.
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
six-1.12.0 (will be automatically downloaded and installed if not already present)
The only use of Scour in this book is by applications which require Python2.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/scour
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
To build the Python 2 module, run the following command:
python setup.py build
To partially test the results, issue: python testcss.py. If you have installed Six you can run the main tests by issuing: python testscour.py.
To install the Python 2 module
run the following command as the root
user:
python setup.py install --optimize=1
To build the Python 3 module, run the following command:
python3 setup.py build
To install the Python 3 module,
run the following command as the root
user:
python3 setup.py install --optimize=1
Six is a Python 2 and 3 compatibility library.
This package is known to build and work properly using an LFS-8.4 platform.
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
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/six
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
Install six for Python2 by running the following commands:
python2 setup.py build
This package does not come with a test suite.
Now, as the root
user:
python2 setup.py install --optimize=1
Install six for Python3 by running the following commands:
python3 setup.py build
This package does not come with a test suite.
Now, as the root
user:
python3 setup.py install --optimize=1
Last updated on 2019-01-11 12:54:44 -0800