The Python module packages add useful objects to the Python language. Modules utilized by packages throughout BLFS are listed here, along with their dependencies. Installation of the modules shown on this page is meant to follow from top to bottom to handle optional dependencies in each module.
D-Bus Python provides Python bindings to the D-Bus.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.4.tar.gz
Download MD5 sum: 7372a588c83a7232b4e08159bfd48fe5
Download size: 600 KB
Estimated disk space required: 9.3 MB (both versions with tests)
Estimated build time: 0.4 SBU (both versions with tests)
dbus-glib-0.108 and Python-2.7.13 and/or Python-3.6.2
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.4 && make && popd
To test the results, issue: make -C python2 check.
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.4 && 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 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.1 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pyatspi/2.24/pyatspi-2.24.0.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pyatspi/2.24/pyatspi-2.24.0.tar.xz
Download MD5 sum: db049a2306a93ef32e3d5a3412918e75
Download size: 292 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
Both Python 2 and Python 3 modules can be built and installed without any conflicts.
To build PyAtSpi2 as the Python 2 module, run the following commands:
mkdir python2 && pushd python2 && ../configure --prefix=/usr --with-python=/usr/bin/python && make && popd
To build PyAtSpi2 as the Python 3 module, run the following commands:
mkdir python3 && pushd python3 && ../configure --prefix=/usr --with-python=/usr/bin/python3 && make && popd
This package does not come with a testsuite.
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
PyCairo provides Python bindings to Cairo.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://github.com/pygobject/pycairo/releases/download/v1.15.1/pycairo-1.15.1.tar.gz
Download MD5 sum: 29620ad9b0fa4a7052760e4fa4b71b4c
Download size: 172 KB
Estimated disk space required: 4.5 MB
Estimated build time: less than 0.1 SBU
Cairo-1.14.10, Python-2.7.13, and/or Python-3.6.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
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
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.1 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
Python-2.7.13 and/or Python-3.6.2
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.6 provides Python 2 bindings to the GObject class from GLib.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.6.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/2.28/pygobject-2.28.6.tar.xz
Download MD5 sum: 9415cb7f2b3a847f2310ccea258b101e
Download size: 732 KB
Estimated disk space required: 24 MB
Estimated build time: 0.2 SBU
GLib-2.52.3 and PyCairo-1.15.1 (Python 2)
gobject-introspection-1.52.1 and libxslt-1.1.29 (to Build Documentation)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pygobject2
Install PyGObject by running the following commands:
patch -Np1 -i ../pygobject-2.28.6-fixes-1.patch && ./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.52.1.
Note that it conflicts with PyGObject-3.24.1.
--disable-docs
: This option disables
the rebuilding of the html documentation if libxslt-1.1.29 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.1 platform.
Download (HTTP): http://ftp.gnome.org/pub/gnome/sources/pygobject/3.24/pygobject-3.24.1.tar.xz
Download (FTP): ftp://ftp.gnome.org/pub/gnome/sources/pygobject/3.24/pygobject-3.24.1.tar.xz
Download MD5 sum: 69a843311d0f0385dff376e11a2d83d2
Download size: 744 KB
Estimated disk space required: 25 MB (both modules, with tests)
Estimated build time: 0.5 SBU (both modules, with tests)
gobject-introspection-1.52.1 and PyCairo-1.15.1 (for Python 2 and/or Python 3 bindings)
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 the Python 2 module, run the following commands:
mkdir python2 && pushd python2 && ../configure --prefix=/usr --with-python=/usr/bin/python && make && popd
To test the results, issue: make -C python2 check. An already active graphical session with bus address is necessary to run the tests.
To build PyGObject3 as the Python 3 module, run the following commands:
mkdir python3 && pushd python3 && ../configure --prefix=/usr --with-python=/usr/bin/python3 && make && popd
To test the results, issue: make -C python3 check. 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:
make -C python2 install
To install the Python 3 module,
run the following command as the root
user:
make -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.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
PyCairo-1.15.1 (Python 2) and Pango-1.40.10
PyCairo-1.15.1 (Python 2) and GTK+-2.24.31.
PyCairo-1.15.1 (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.29 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.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
Python-2.7.13 and/or Python-3.6.2
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pyxdg
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
funcsigs is a is a backport of the PEP 362 function signature features from Python 3.3's inspect module for Python 2.x.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/f/funcsigs/funcsigs-1.0.2.tar.gz
Download MD5 sum: 7e583285b1fb8a76305d6d68f4ccc14e
Download size: 32 KB
Estimated disk space required: 440 KB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/funcsigs
To install the Python 2 module,
run the following command as the root
user:
python setup.py install --optimize=1
This module is included with Python distributions after 3.3.
Beaker is a Python module that implements caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/B/Beaker/Beaker-1.9.0.tar.gz
Download MD5 sum: 38b3fcdfa24faf97c6cf66991eb54e9c
Download size: 40 KB
Estimated disk space required: 900 KB
Estimated build time: less than 0.1 SBU
funcsigs-1.0.2 (required for Python-2.7)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Beaker
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
lxml provides Python bindings for libxslt-1.1.29 and libxml2-2.9.4.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/l/lxml/lxml-3.8.0.tar.gz
Download MD5 sum: e54e2fae44d684d6b9c636fe189e93ff
Download size: 3.6 MB
Estimated disk space required: 104 MB
Estimated build time: 1.3 SBU
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 install the Python 2 module,
run the following commands as the root
user:
python setup.py build && python setup.py install --optimize=1
To install the Python 3 module,
run the following commands as the root
user:
python3 setup.py clean && python3 setup.py build && 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.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-1.0.tar.gz
Download MD5 sum: 2fcedc9284d50e577b5192e8e3578355
Download size: 16 KB
Estimated disk space required: 872 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 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
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.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-2.9.6.tar.gz
Download MD5 sum: 6411537324b4dba0956aaa8109f3c77b
Download size: 428 KB
Estimated disk space required: 10 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.1 platform.
Download (HTTP): https://files.pythonhosted.org/packages/source/M/Mako/Mako-1.0.4.tar.gz
Download MD5 sum: c5fc31a323dd4990683d2f2da02d4e20
Download size: 564 KB
Estimated disk space required: 5.6 MB
Estimated build time: less than 0.1 SBU
Beaker-1.9.0 and MarkupSafe-1.0
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Mako
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:
sed -i "s:mako-render:&3:g" setup.py && python3 setup.py install --optimize=1
sed -i "s:mako-render:&3:g" setup.py: This sed prevents setup.py from overwriting an already installed script by the Python 2 module. Remove it if you are building this module only for Python 3.
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.1 platform.
Download (HTTP): http://pyyaml.org/download/pyyaml/PyYAML-3.12.tar.gz
Download MD5 sum: 4c129761b661d181ebf7ff4eb2d79950
Download size: 248 KB
Estimated disk space required: 10 MB
Estimated build time: 0.1 SBU
Python-2.7.13 and/or Python-3.6.2 and YAML-0.1.7
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.1 platform.
Download (HTTP): https://github.com/scour-project/scour/archive/v0.36/scour-0.36.tar.gz
Download MD5 sum: f7d03395a9ce51f822e5741034783e04
Download size: 90 KB
Estimated disk space required: 1.6 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/scour
Although this package installs modules for Python 2 or Python 3 they are usually invoked by scour which is a script using the version of Python for which it was compiled.
For the moment, use of Python 2 will normally be adequate.
To build the Python 2 module, issue:
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
If you wish to install the Python 3 modules, change 'python' to 'python3' in each of the above steps.
Six is a Python 2 and 3 compatibility library.
This package is known to build and work properly using an LFS-8.1 platform.
Download (HTTP): https://pypi.io/packages/source/s/six/six-1.10.0.tar.gz
Download MD5 sum: 34eed507548117b2ab523ab14b2f8b55
Download size: 32 KB
Estimated disk space required: 356 KB
Estimated build time: less than 0.1 SBU
Python-2.7.13 and/or Python-3.6.2
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/six
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 2017-08-21 13:22:19 -0700