source: chapter08/python.xml@ 2cac686

arm
Last change on this file since 2cac686 was 884fd47, checked in by William Harrington <kb0iic@…>, 2 years ago

Package updates.
Update to sysvinit-3.02.
Update to zlib-1.2.12.
Update to expat-2.4.8.
Update to Jinja2-3.1.1.
Update to Python-3.10.4.
Update to procps-ng-4.0.0.
Update to iproute2-5.17.0.
Update to meson-0.62.0.
Update to linux-5.17.1.
Update to util-linux-2.38.

  • Property mode set to 100644
File size: 6.8 KB
Line 
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">
20 <primary sortas="a-Python">Python</primary>
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
28 large programs, or developing entire applications.</para>
29
30 <segmentedlist>
31 <segtitle>&buildtime;</segtitle>
32 <segtitle>&diskspace;</segtitle>
33
34 <seglistitem>
35 <seg>&python-fin-sbu;</seg>
36 <seg>&python-fin-du;</seg>
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
47<screen><userinput remap="configure">./configure --prefix=/usr \
48 --enable-shared \
49 --with-system-expat \
50 --with-system-ffi \
51 --enable-optimizations</userinput></screen>
52
53 <variablelist>
54 <title>The meaning of the configure options:</title>
55
56 <varlistentry>
57 <term><parameter>--with-system-expat</parameter></term>
58 <listitem>
59 <para>This switch enables linking against system version of
60 <application>Expat</application>.</para>
61 </listitem>
62 </varlistentry>
63
64 <varlistentry>
65 <term><parameter>--with-system-ffi</parameter></term>
66 <listitem>
67 <para>This switch enables linking against system version of
68 <application>libffi</application>.</para>
69 </listitem>
70 </varlistentry>
71
72 <varlistentry>
73 <term><parameter>--enable-optimizations</parameter></term>
74 <listitem>
75 <para>This switch enables stable, but expensive, optimizations.</para>
76 </listitem>
77 </varlistentry>
78
79 </variablelist>
80
81 <para>Compile the package:</para>
82
83<screen><userinput remap="make">make</userinput></screen>
84
85 <para>Running the tests at this point is not recommended. The
86 tests are known to hang indefinitely in the partial LFS environment.
87 If desired, the tests can be rerun at the end of this chapter or
88 when Python 3 is reinstalled in BLFS. To run the tests anyway,
89 issue <command>make test</command>.</para>
90
91 <para>Install the package:</para>
92
93<screen><userinput remap="install">make install</userinput></screen>
94
95 <para>If desired, install the preformatted documentation:</para>
96
97<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
98
99tar --strip-components=1 \
100 --no-same-owner \
101 --no-same-permissions \
102 -C /usr/share/doc/python-&python-version;/html \
103 -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
104
105 <variablelist>
106 <title>The meaning of the documentation install commands:</title>
107
108 <varlistentry>
109 <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
110 <listitem>
111 <para>Ensure the installed files have the correct ownership and
112 permissions. Without these options, using <application>tar</application>
113 will install the package files with the upstream creator's values.
114 </para>
115 </listitem>
116 </varlistentry>
117
118 </variablelist>
119
120 </sect2>
121
122 <sect2 id="contents-python" role="content">
123 <title>Contents of Python 3</title>
124
125 <segmentedlist>
126 <segtitle>Installed Programs</segtitle>
127 <segtitle>Installed Library</segtitle>
128 <segtitle>Installed Directories</segtitle>
129
130 <seglistitem>
131 <seg>
132 2to3, idle3, pip3, pydoc3, python3, and python3-config
133 </seg>
134 <seg>
135 libpython&python-minor;.so and libpython3.so
136 </seg>
137 <seg>
138 /usr/include/python&python-minor;,
139 /usr/lib/python3, and
140 /usr/share/doc/python-&python-version;
141 </seg>
142 </seglistitem>
143 </segmentedlist>
144
145 <variablelist>
146 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
147 <?dbfo list-presentation="list"?>
148 <?dbhtml list-presentation="table"?>
149
150 <varlistentry id="python-2to3">
151 <term><command>2to3</command></term>
152 <listitem>
153 <para>
154 is a <application>Python</application> program that reads
155 <application>Python 2.x</application> source code and applies a
156 series of fixes to transform it into
157 valid <application>Python 3.x</application> code
158 </para>
159 <indexterm zone="ch-system-Python">
160 <primary sortas="b-2to3">2to3</primary>
161 </indexterm>
162 </listitem>
163 </varlistentry>
164
165 <varlistentry id="idle3">
166 <term><command>idle3</command></term>
167 <listitem>
168 <para>
169 is a wrapper script that opens a <application>Python</application>
170 aware GUI editor. For this script to run, you must have installed
171 <application>Tk</application> before Python so that the Tkinter
172 Python module is built
173 </para>
174 <indexterm zone="ch-system-Python">
175 <primary sortas="b-idle3">idle3</primary>
176 </indexterm>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry id="pip3">
181 <term><command>pip3</command></term>
182 <listitem>
183 <para>
184 The package installer for Python. You can use pip to install
185 packages from Python Package Index and other indexes
186 </para>
187 <indexterm zone="ch-system-Python">
188 <primary sortas="b-pip3">pip3</primary>
189 </indexterm>
190 </listitem>
191 </varlistentry>
192
193 <varlistentry id="pydoc3">
194 <term><command>pydoc3</command></term>
195 <listitem>
196 <para>
197 is the <application>Python</application> documentation tool
198 </para>
199 <indexterm zone="ch-system-Python">
200 <primary sortas="b-pydoc3">pydoc3</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="python3">
206 <term><command>python3</command></term>
207 <listitem>
208 <para>
209 is an interpreted, interactive, object-oriented programming
210 language
211 </para>
212 <indexterm zone="ch-system-Python">
213 <primary sortas="b-python3">python3</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 </variablelist>
219
220 </sect2>
221
222</sect1>
223
Note: See TracBrowser for help on using the repository browser.