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-9.1 platform.
Download (HTTP): https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.16.tar.gz
Download MD5 sum: 51a45c973d82bedff033a4b57d69d5d8
Download size: 564 KB
Estimated disk space required: 11 MB (both versions, with tests)
Estimated build time: 0.4 SBU (both versions, with tests)
Python-2.7.17 (some applications in the book require the Python 2 module)
PyGObject-3.34.0 and tap.py (required for some tests)
docutils-0.16 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/python2 \ ../configure --prefix=/usr --docdir=/usr/share/doc/dbus-python-1.2.16 && 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.16 && 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-9.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/d/decorator/decorator-4.4.1.tar.gz
Download MD5 sum: 933981f288c4230816b5beee8d40e6ea
Download size: 36 KB
Estimated disk space required: 240 KB
Estimated build time: less than 0.1 SBU
User Notes: http://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-9.1 platform.
Download (HTTP): http://downloads.sourceforge.net/docutils/docutils-0.16.tar.gz
Download MD5 sum: 9ccb6f332e23360f964de72c8ea5f0ed
Download size: 1.8 MB
Estimated disk space required: 12 MB
Estimated build time: less than 0.1 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-9.1 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pyatspi/2.34/pyatspi-2.34.0.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pyatspi/2.34/pyatspi-2.34.0.tar.xz
Download MD5 sum: bbe80f95f09091dac306a62d286bd19b
Download size: 308 KB
Estimated disk space required: 3.0 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pyatspi2
PyCairo provides Python bindings to Cairo.
This package is known to build and work properly using an LFS-9.1 platform.
Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.19.0/pycairo-1.19.0.tar.gz
Download MD5 sum: 38b84416021640b01250c8f8ec4c52d4
Download size: 200 KB
Estimated disk space required: 3.7 MB
Estimated build time: less than 0.1 SBU
Hypothesis (for tests)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycairo
The current version of pycairo no longer builds the Python2 module. If you need that module for packages sych as Gimp-2.10.18, 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-9.1 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.2+f93fc72c03e, Python-2.7.17
Hypothesis (for tests)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycairo
This version of PyCairo is only retained for packages such as Gimp-2.10.18 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-9.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/p/pycryptodome/pycryptodome-3.9.6.tar.gz
Download MD5 sum: 9d0a8b1a2367248f9d3f46c48c70f2d0
Download size: 15 MB
Estimated disk space required: 148 MB
Estimated build time: 0.3 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pycryptodome
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
dbusmock 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-9.1 platform.
Download (HTTP): https://github.com/martinpitt/python-dbusmock/releases/download/0.19/python-dbusmock-0.19.tar.gz
Download MD5 sum: 565aaae672e065c9c17e7fafd1843701
Download size: 72 KB
Estimated disk space required: 888 KB
Estimated build time: less than 0.1 SBU
User Notes: http://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-9.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-2.5.2.tar.gz
Download MD5 sum: 465a35559863089d959d783a69f79b9f
Download size: 19.3 MB
Estimated disk space required: 70 MB
Estimated build time: less than 0.1 SBU
User Notes: http://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-9.1 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.62.4, PyCairo-1.18.2 and Python-2.7.17
gobject-introspection-1.62.0 and libxslt-1.1.34 (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.62.0.
Note that it conflicts with PyGObject-3.34.0.
--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-9.1 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/3.34/pygobject-3.34.0.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/3.34/pygobject-3.34.0.tar.xz
Download MD5 sum: ca1dc4f31c1d6d283758e8f315a88ab6
Download size: 540 KB
Estimated disk space required: 20 MB
Estimated build time: 0.1 SBU (Using parallelism=4)
gobject-introspection-1.62.0 and PyCairo-1.19.0 (Python 3 module)
Python-2.7.17 and PyCairo-1.19.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. 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
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.1 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.17
PyCairo-1.18.2 and Pango-1.44.7
PyCairo-1.18.2 and GTK+-2.24.32.
PyCairo-1.18.2 and libglade-2.6.4.
User Notes: http://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-9.1 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
These instructions provide the Python2 bindings for libxml2: the Python3 bindings are built as part of libxml2-2.9.10 and most packages in the book do not use these bindings for the older Python2.
By building these bindings after libxml2-2.9.10 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.1 platform.
Download (HTTP): http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz
Download (FTP): ftp://xmlsoft.org/libxml2/libxml2-2.9.10.tar.gz
Download MD5 sum: 10942a1dc23137a8aa07f0639cbfece5
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.10 and Python-2.7.17
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libxml2
lxml provides Python bindings for libxslt-1.1.34 and libxml2-2.9.10.
This package is known to build and work properly using an LFS-9.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/l/lxml/lxml-4.5.0.tar.gz
Download MD5 sum: f088e452ed45b030b6f84269f1e84d11
Download size: 4.3 MB
Estimated disk space required: 223 MB (add 60 MB for tests)
Estimated build time: 2.4 SBU (add 2.3 SBU for tests)
GDB-9.1, Valgrind-3.15.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 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-9.1 platform.
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
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
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.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.11.1.tar.gz
Download MD5 sum: 5d88c7e77aa63fc852a04f65dbfe5594
Download size: 252 KB
Estimated disk space required: 2.6 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:
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
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.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.1.1.tar.gz
Download MD5 sum: 2660a4916f2f63456e6885c727b7cd2f
Download size: 460 KB
Estimated disk space required: 3.1 MB
Estimated build time: less than 0.1 SBU
User Notes: http://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-9.1 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.16, decorator-4.4.1, and six-1.14.0
User Notes: http://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-9.1 platform.
Download (HTTP): http://pyyaml.org/download/pyyaml/PyYAML-5.3.tar.gz
Download MD5 sum: adbb0d336b509d6472d3b095a0f1cf30
Download size: 264 KB
Estimated disk space required: 15 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 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
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.1 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.14.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 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
Six is a Python 2 and 3 compatibility library.
This package is known to build and work properly using an LFS-9.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/s/six/six-1.14.0.tar.gz
Download MD5 sum: 21674588a57e649d1a6d977ec3122140
Download size: 36 KB
Estimated disk space required: 376 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 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 2020-02-13 15:23:59 -0800