source: chapter08/python.xml@ 5ed37b3

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 5ed37b3 was 5ed37b3, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Remove python tests in Chapter 8

  • Property mode set to 100644
File size: 7.1 KB
RevLine 
[fcc02767]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-Python" role="wrap">
9 <?dbhtml filename="Python.html"?>
10
11 <sect1info condition="script">
12 <productname>Python</productname>
13 <productnumber>&python-version;</productnumber>
14 <address>&python-url;</address>
15 </sect1info>
16
17 <title>Python-&python-version;</title>
18
19 <indexterm zone="ch-system-Python">
[4798321]20 <primary sortas="a-Python">Python</primary>
[fcc02767]21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Python 3 package contains the Python development environment. It
27 is useful for object-oriented programming, writing scripts, prototyping
[6a156bab]28 large programs, or developing entire applications.</para>
[fcc02767]29
30 <segmentedlist>
31 <segtitle>&buildtime;</segtitle>
32 <segtitle>&diskspace;</segtitle>
33
34 <seglistitem>
[fb386e0]35 <seg>&python-fin-sbu;</seg>
36 <seg>&python-fin-du;</seg>
[fcc02767]37 </seglistitem>
38 </segmentedlist>
39
40 </sect2>
41
42 <sect2 role="installation">
43 <title>Installation of Python 3</title>
44
45 <para>Prepare Python for compilation:</para>
46
[5ed37b3]47<screen><userinput remap="configure">./configure --prefix=/usr \
48 --enable-shared \
49 --with-system-expat \
50 --with-system-ffi \
51 --with-ensurepip=yes \
52 --enable-optimizations</userinput></screen>
[fcc02767]53
54 <variablelist>
55 <title>The meaning of the configure options:</title>
56
57 <varlistentry>
58 <term><parameter>--with-system-expat</parameter></term>
59 <listitem>
60 <para>This switch enables linking against system version of
61 <application>Expat</application>.</para>
62 </listitem>
63 </varlistentry>
64
65 <varlistentry>
66 <term><parameter>--with-system-ffi</parameter></term>
67 <listitem>
68 <para>This switch enables linking against system version of
69 <application>libffi</application>.</para>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><parameter>--with-ensurepip=yes</parameter></term>
75 <listitem>
76 <para>This switch enables building <command>pip</command> and
77 <command>setuptools</command> packaging programs.</para>
78 </listitem>
79 </varlistentry>
80
[5ed37b3]81 <varlistentry>
82 <term><parameter>--enable-optimizations</parameter></term>
83 <listitem>
84 <para>This switch enables stable, but expensive, optimizations.</para>
85 </listitem>
86 </varlistentry>
87
[fcc02767]88 </variablelist>
89
90 <para>Compile the package:</para>
91
92<screen><userinput remap="make">make</userinput></screen>
93
[5ed37b3]94 <para>Running the tests at this point is not recommended. The
95 tests are known to hang indefinitely in the partial LFS environment.
96 If desired, the tests can be rerun at the end of this chapter or
97 when Python 3 is reinstalled in BLFS. To run the tests anyway,
98 issue <command>make test</command>.</para>
[fcc02767]99
100 <para>Install the package:</para>
101
[3cf8a59]102<screen><userinput remap="install">make install</userinput></screen>
[fcc02767]103
104 <para>If desired, install the preformatted documentation:</para>
105
106<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
107
108tar --strip-components=1 \
109 --no-same-owner \
110 --no-same-permissions \
111 -C /usr/share/doc/python-&python-version;/html \
112 -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
113
114 <variablelist>
115 <title>The meaning of the documentation install commands:</title>
116
117 <varlistentry>
118 <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
119 <listitem>
120 <para>Ensure the installed files have the correct ownership and
121 permissions. Without these options, using <application>tar</application>
122 will install the package files with the upstream creator's values.
123 </para>
124 </listitem>
125 </varlistentry>
126
127 </variablelist>
128
129 </sect2>
130
131 <sect2 id="contents-python" role="content">
132 <title>Contents of Python 3</title>
133
134 <segmentedlist>
135 <segtitle>Installed Programs</segtitle>
136 <segtitle>Installed Library</segtitle>
137 <segtitle>Installed Directories</segtitle>
138
139 <seglistitem>
140 <seg>
141 2to3, idle3, pip3, pydoc3, python3, and python3-config
142 </seg>
143 <seg>
144 libpython&python-minor;.so and libpython3.so
145 </seg>
146 <seg>
147 /usr/include/python&python-minor;,
148 /usr/lib/python3, and
149 /usr/share/doc/python-&python-version;
150 </seg>
151 </seglistitem>
152 </segmentedlist>
153
154 <variablelist>
155 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
156 <?dbfo list-presentation="list"?>
157 <?dbhtml list-presentation="table"?>
158
159 <varlistentry id="python-2to3">
160 <term><command>2to3</command></term>
161 <listitem>
162 <para>
163 is a <application>Python</application> program that reads
164 <application>Python 2.x</application> source code and applies a
[6a156bab]165 series of fixes to transform it into
[8d35535]166 valid <application>Python 3.x</application> code
[fcc02767]167 </para>
168 <indexterm zone="ch-system-Python">
169 <primary sortas="b-2to3">2to3</primary>
170 </indexterm>
171 </listitem>
172 </varlistentry>
173
174 <varlistentry id="idle3">
175 <term><command>idle3</command></term>
176 <listitem>
177 <para>
178 is a wrapper script that opens a <application>Python</application>
179 aware GUI editor. For this script to run, you must have installed
180 <application>Tk</application> before Python so that the Tkinter
[8d35535]181 Python module is built
[fcc02767]182 </para>
183 <indexterm zone="ch-system-Python">
184 <primary sortas="b-idle3">idle3</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="pip3">
190 <term><command>pip3</command></term>
191 <listitem>
192 <para>
193 The package installer for Python. You can use pip to install
[8d35535]194 packages from Python Package Index and other indexes
[fcc02767]195 </para>
196 <indexterm zone="ch-system-Python">
197 <primary sortas="b-pip3">pip3</primary>
198 </indexterm>
199 </listitem>
200 </varlistentry>
201
202 <varlistentry id="pydoc3">
203 <term><command>pydoc3</command></term>
204 <listitem>
205 <para>
[8d35535]206 is the <application>Python</application> documentation tool
[fcc02767]207 </para>
208 <indexterm zone="ch-system-Python">
209 <primary sortas="b-pydoc3">pydoc3</primary>
210 </indexterm>
211 </listitem>
212 </varlistentry>
213
214 <varlistentry id="python3">
215 <term><command>python3</command></term>
216 <listitem>
217 <para>
218 is an interpreted, interactive, object-oriented programming
[8d35535]219 language
[fcc02767]220 </para>
221 <indexterm zone="ch-system-Python">
222 <primary sortas="b-python3">python3</primary>
223 </indexterm>
224 </listitem>
225 </varlistentry>
[6a156bab]226
[fcc02767]227 </variablelist>
228
229 </sect2>
230
231</sect1>
232
Note: See TracBrowser for help on using the repository browser.