Files
LFS_Book/chapter05/python.xml
Anton Maisak f591cd8967 SYNC
Revision: 11573
Author: pierre
Date: 10 апреля 2019 г. 23:18:23
Message:
Add a note about which tarball to use for Python
----
Modified : /trunk/BOOK/chapter05/python.xml
2019-08-10 10:58:42 +03:00

94 lines
3.5 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-tools-Python" role="wrap">
<?dbhtml filename="Python.html"?>
<sect1info condition="script">
<productname>Python</productname>
<productnumber>&python-version;</productnumber>
<address>&python-url;</address>
</sect1info>
<title>Python-&python-version;</title>
<indexterm zone="ch-tools-Python">
<primary sortas="a-Python">Python</primary>
<secondary>tools</secondary>
</indexterm>
<sect2 role="package">
<title/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../chapter06/python.xml"
xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&python-ch5-sbu;</seg>
<seg>&python-ch5-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Установка пакета Python</title>
<note>
<para>Есть два файла пакета, имя которых начинается с
<quote>python</quote>. Необхдимо распаковать пакет
<filename>Python-&python-version;.tar.xz</filename> (первая буква - заглавная).</para>
</note>
<para>Пакет сначала выполняет сборку интерпретатора Python, затем, некоторые стандартные модули. Основной файл сценария для сборки модулей написан на Python, и использует жестко прописанные пути к каталогам хост системы
<filename class="directory">/usr/include</filename> и <filename
class="directory">/usr/lib</filename>. Необходимо предотвратить такое поведение и скорректировать файл сценария:</para>
<screen><userinput remap="pre">sed -i '/def add_multiarch_paths/a \ return' setup.py</userinput></screen>
<para>Подготовьте пакет Python к компиляции::</para>
<screen><userinput remap="configure">./configure --prefix=/tools --without-ensurepip</userinput></screen>
<variablelist>
<title>Значение параметров конфигурации::</title>
<varlistentry>
<term><parameter>--without-ensurepip</parameter></term>
<listitem>
<para>Аргумент отключает установщик Python, котрый не требуется на этом этапе.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Скомпилируйте пакет:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>Компиляция завершена. Для выполнения тестов требуется TK и X Windows, и сейчас, не могут быть запущены.</para>
<para>Установите пакет:</para>
<screen><userinput remap="install">make install</userinput></screen>
</sect2>
<sect2 role="content">
<title/>
<para>Подробная информация об этом пакете находится в
<xref linkend="contents-python" role="."/></para>
</sect2>
</sect1>