BLFS Python模块

警告

这里记录我所用到的软件包所依赖Python Modules: 即我只安装我需要的部分模块

Packaging

Packaging 库提供交互操作性规范的使用程序,包括用于版本处理,说明符(specifiers),标记(makers),标签(tags)以及要求的实用程序。

安装packaging Python模块
cd /sources

packaging_VERSION=24.1
tar xf packaging-${packaging_VERSION}.tar.gz
cd packaging-${packaging_VERSION}

# 编译模块
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD

# 安装模块
pip3 install --no-index --find-links=dist --no-cache-dir --no-user packaging

# 如果安装了pytest,则可以执行测试(可选,我没有执行)
python3 -m venv --system-site-packages testenv &&
source testenv/bin/activate                    &&
pip3 install pretend                           &&
python3 /usr/bin/pytest
deactivate

docutils

docutils 是Python中处理HTML,XML或LaTeX的模块,在编译 GLib 时候会提示需要 rst2man 是通过这个模块获得

安装docutils Python模块
cd /sources

docutils_VERSION=0.21.2
tar xf docutils-${docutils_VERSION}.tar.gz
cd docutils-${docutils_VERSION}

# 移除已经不再正确的旧版
for f in /usr/bin/rst*.py; do
  rm -fv /usr/bin/$(basename $f .py)
done

# 编译模块
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD

# 安装模块
pip3 install --no-index --find-links=dist --no-cache-dir --no-user docutils