Files
LFS_Book/chapter05/python.xml
Anton Maisak 9ed816bd4e SYNC
Revision: 11519
Author: bdubbs
Date: 14 февраля 2019 г. 22:11:08
Message:
Fix a problem when building Python in Chapter 5 where some hosts may use host
dependent headers.

----
Modified : /trunk/BOOK/chapter01/changelog.xml
Modified : /trunk/BOOK/chapter05/python.xml
Modified : /trunk/BOOK/chapter06/bash.xml
Modified : /trunk/BOOK/general.ent
2019-02-17 11:43:33 +03:00

88 lines
3.2 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>
<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>