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 API interface.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.18.tar.gz
Download MD5 sum: 468874f3bf61d1b7deac98bbe2cfd8ac
Download size: 568 KB
Estimated disk space required: 10 MB (both versions, with tests)
Estimated build time: 0.3 SBU (both versions, with tests)
Python-2.7.18 (some applications in the book require the Python 2 module)
PyGObject-3.40.1 and tap.py (required for some tests)
docutils-0.17.1 and Sphinx with sphinx_rtd_theme
User Notes: https://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/python2 \ ../configure --prefix=/usr --disable-documentation && make && popd
To test the results, issue: make -C python2 check. Several tests report an 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.18 && 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
The goal of the decorator module is to make it easy to define signature-preserving function decorators and decorator factories.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/d/decorator/decorator-5.0.9.tar.gz
Download MD5 sum: a90526e45e7a30cf2710d6467f403e03
Download size: 36 KB
Estimated disk space required: 232 KB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/decorator
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-11.0 platform.
Download (HTTP): https://downloads.sourceforge.net/docutils/docutils-0.17.1.tar.gz
Download MD5 sum: ed810564c25063e9dac10dd0893ead47
Download size: 1.9 MB
Estimated disk space required: 12 MB
Estimated build time: less than 0.1 SBU
User Notes: https://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
Py3c helps you port C extensions to Python 3. It provides a detailed guide, and a set of macros to make porting easy and reduce boilerplate.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/encukou/py3c/archive/v1.3.1/py3c-1.3.1.tar.gz
Download MD5 sum: 57f6518f3a7bcd501425bb23f2de15a7
Download size: 48 KB
Estimated disk space required: 1.4 MB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/py3c
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-11.0 platform.
Download (HTTP): https://download.gnome.org/sources/pyatspi/2.38/pyatspi-2.38.1.tar.xz
Download (FTP): ftp://ftp.acc.umu.se/pub/gnome/sources/pyatspi/2.38/pyatspi-2.38.1.tar.xz
Download MD5 sum: bac820e859310c64fe37c227be657656
Download size: 312 KB
Estimated disk space required: 3.7 MB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pyatspi2
PyCairo provides Python bindings to Cairo.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.20.1/pycairo-1.20.1.tar.gz
Download MD5 sum: fa88a28cadbfb34192fe743d32c0ee33
Download size: 340 KB
Estimated disk space required: 3.5 MB
Estimated build time: less than 0.1 SBU
Hypothesis (for tests)
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycairo
The current version of pycairo no longer builds the Python2 module. If you need that module for packages such as Gimp-2.10.24, use PyCairo-1.18.2
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
This version of PyCairo provides Python2 bindings to Cairo.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.18.2/pycairo-1.18.2.tar.gz
Download MD5 sum: be2ba51f234270dec340f28f1695a95e
Download size: 196 KB
Estimated disk space required: 2.3 MB
Estimated build time: less than 0.1 SBU
Cairo-1.17.4 and Python-2.7.18
Hypothesis (for tests)
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycairo
This version of PyCairo is only retained for packages such as Gimp-2.10.24 which is stuck on Python2 until Gimp-3 is released.
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
PyCryptodome is a collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.), and is a drop-in replacement for PyCrypto.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/Legrandin/pycryptodome/archive/v3.10.1/pycryptodome-3.10.1.tar.gz
Download MD5 sum: 31f5e8c91e8e0fa45da14271b394bba4
Download size: 15 MB
Estimated disk space required: 58 MB
Estimated build time: 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pycryptodome
dbusmock is a Python library useful for writing tests for software which talks to D-Bus services.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/martinpitt/python-dbusmock/releases/download/0.23.1/python-dbusmock-0.23.1.tar.gz
Download MD5 sum: 9f32436dab51f159e988354de1b469ae
Download size: 80 KB
Estimated disk space required: 1.3 KB
Estimated build time: less than 0.1 SBU
D-Bus Python-1.2.18 (runtime)
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/dbusmock
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-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-2.10.0.tar.gz
Download MD5 sum: 87369a4e15019caf9cf056ab2c5858b3
Download size: 3.9 MB
Estimated disk space required: 54 MB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygments
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-11.0 platform.
Download (HTTP): https://download.gnome.org/sources/pygobject/2.28/pygobject-2.28.7.tar.xz
Download (FTP): ftp://ftp.acc.umu.se/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.68.4, PyCairo-1.18.2 and Python-2.7.18
gobject-introspection-1.68.0 and libxslt-1.1.34 (to Build Documentation)
User Notes: https://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.68.0.
Note that it conflicts with PyGObject-3.40.1.
--disable-docs
: This option disables
the rebuilding of the html documentation if libxslt-1.1.34 is
installed.
PyGObject3 provides Python bindings to the GObject class from GLib.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://download.gnome.org/sources/pygobject/3.40/pygobject-3.40.1.tar.xz
Download (FTP): ftp://ftp.acc.umu.se/pub/gnome/sources/pygobject/3.40/pygobject-3.40.1.tar.xz
Download MD5 sum: f27e0a2d1526df57c89624cdebbd69e0
Download size: 544 KB
Estimated disk space required: 15 MB
Estimated build time: 0.2 SBU (Using parallelism=4)
gobject-introspection-1.68.0 and PyCairo-1.20.1 (Python 3 module)
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygobject3
First, remove a faulty test:
mv -v tests/test_gdbus.py{,.nouse}
Install pygobject3 by running the following commands:
mkdir build && cd build && meson --prefix=/usr --buildtype=release .. && ninja
To test the results, issue: ninja
test. An already active graphical session with a
bus address is necessary to run the tests. One test, tests/test_gdbus.py
, is known to fail.
Now, as the root
user:
ninja 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-11.0 platform.
Download (HTTP): https://download.gnome.org/sources/pygtk/2.24/pygtk-2.24.0.tar.bz2
Download (FTP): ftp://ftp.acc.umu.se/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.18
PyCairo-1.18.2 and Pango-1.48.9
PyCairo-1.18.2 and GTK+-2.24.33.
PyCairo-1.18.2 and libglade-2.6.4.
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pygtk
First, adapt PyGTK to changes in Pango by removing undefined APIs:
sed -i '1394,1402 d' pango.defs
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.34 is installed.
PyXDG is a Python library to access freedesktop.org standards.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/6f/2e/2251b5ae2f003d865beef79c8fcd517e907ed6a69f58c32403cec3eba9b2/pyxdg-0.27.tar.gz
Download MD5 sum: 2a2844c21b1b038d74433a0c4aef0a88
Download size: 60 KB
Estimated disk space required: 708 KB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/pyxdg
These instructions provide the Python2 bindings for libxml2: the Python3 bindings are built as part of libxml2-2.9.12 and most packages in the book do not use these bindings for the older Python2.
By building these bindings after libxml2-2.9.12 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-11.0 platform.
Download (HTTP): http://xmlsoft.org/sources/libxml2-2.9.12.tar.gz
Download (FTP): ftp://xmlsoft.org/libxml2/libxml2-2.9.12.tar.gz
Download MD5 sum: f433a39be087a9f0b197eb2307ad9f75
Download size: 5.4 MB
Estimated disk space required: 53 MB (2.3 MB installed)
Estimated build time: less than 0.1 SBU
libxml2-2.9.12 and Python-2.7.18
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libxml2
lxml provides Python bindings for libxslt-1.1.34 and libxml2-2.9.12.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/l/lxml/lxml-4.6.3.tar.gz
Download MD5 sum: 017f94473dcec0f9b2e9b03524398fa5
Download size: 3.0 MB
Estimated disk space required: 204 MB (add 29 MB for tests)
Estimated build time: 1.6 SBU (add 0.6 SBU for tests)
GDB-10.2, Valgrind-3.17.0, and cssselect
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/lxml
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.
To install both modules, issue the following commands as the
root
user:
python2 setup.py install --optimize=1 && 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-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-2.0.1.tar.gz
Download MD5 sum: 892e0fefa3c488387e5cc0cad2daa523
Download size: 20 KB
Estimated disk space required: 360 KB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/MarkupSafe
Jinja2 is a Python module that implements a simple pythonic template language.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-3.0.1.tar.gz
Download MD5 sum: 25ba6ef98c164878acff1036fbd72a1d
Download size: 264 KB
Estimated disk space required: 2.3 MB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Jinja2
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-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.1.5.tar.gz
Download MD5 sum: 409bdc38e9ddda5eada61fb092cb12fd
Download size: 484 KB
Estimated disk space required: 3.9 MB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Mako
python-slip provides convenience, extension and workaround code for Python and some Python modules.
This package is known to build and work properly using an LFS-11.0 platform.
Download (HTTP): https://github.com/nphilipp/python-slip/releases/download/python-slip-0.6.5/python-slip-0.6.5.tar.bz2
Download MD5 sum: 28ae5f93853466c44ec96706ba2a1eb4
Download size: 28 KB
Estimated disk space required: 612 KB
Estimated build time: 0.1 SBU
D-Bus Python-1.2.18, decorator-5.0.9, and six-1.16.0
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/python-slip
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-11.0 platform.
Download (HTTP): https://pyyaml.org/download/pyyaml/PyYAML-5.3.1.tar.gz
Download MD5 sum: d3590b85917362e837298e733321962b
Download size: 264 KB
Estimated disk space required: 15 MB
Estimated build time: 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/PyYAML
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-11.0 platform.
Download (HTTP): https://github.com/scour-project/scour/archive/v0.38.2/scour-0.38.2.tar.gz
Download MD5 sum: ae30f52602802f8c7df3a32e1f72b325
Download size: 100 KB
Estimated disk space required: 1.3 MB
Estimated build time: less than 0.1 SBU
six-1.16.0 (will be automatically downloaded and installed if not already present)
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/scour
To build the Python 3 module run the following commands:
python3 setup.py build
To partially test the results, issue: python3 test_css.py. If you have installed Six you can run the main tests by issuing: python3 test_scour.py.
To install the 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-11.0 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/s/six/six-1.16.0.tar.gz
Download MD5 sum: a7c927740e4964dd29b72cebfc1429bb
Download size: 36 KB
Estimated disk space required: 376 KB
Estimated build time: less than 0.1 SBU
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/six
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
Last updated on