aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/python.xml
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2019-02-14 19:11:08 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2019-02-14 19:11:08 +0000
commit791b6c7029f0b6fcbae872645ddf7cfb634d125a (patch)
tree0106cb40cf8e6c226f5d824ef4150336d8eede88 /chapter05/python.xml
parent75828c36ccd065cca1236e0b5fc824e726d211b4 (diff)
Fix a problem when building Python in Chapter 5 where some hosts may use host
dependent headers. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11519 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05/python.xml')
-rw-r--r--chapter05/python.xml24
1 files changed, 23 insertions, 1 deletions
diff --git a/chapter05/python.xml b/chapter05/python.xml
index a52c08294..951185b31 100644
--- a/chapter05/python.xml
+++ b/chapter05/python.xml
@@ -43,9 +43,31 @@
<sect2 role="installation">
<title>Installation of Python</title>
+ <para>This package first builds the Python interpreter, then some
+ standard Python modules. The main script for building modules is
+ written in Python, and uses hard-coded paths to the host <filename
+ class="directory">/usr/include</filename> and <filename
+ class="directory">/usr/lib</filename> directories. To prevent them
+ from being used, issue:</para>
+
+<screen><userinput remap="pre">sed -i '/def add_multiarch_paths/a \ return' setup.py</userinput></screen>
+
<para>Prepare Python for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/tools --with-ensurepip=no</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/tools --without-ensurepip</userinput></screen>
+
+ <variablelist>
+ <title>The meaning of the configure option:</title>
+
+ <varlistentry>
+ <term><parameter>--without-ensurepip</parameter></term>
+ <listitem>
+ <para>This switch disables the Python installer, which is not needed
+ at this stage.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
<para>Compile the package:</para>