source: chapter06/python.xml@ b0aabe0

10.0 10.0-rc1 10.1 10.1-rc1 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 8.2 8.3 8.4 9.0 9.1 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 b0aabe0 was b0aabe0, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Add Meson-0.42.1.
Add Ninja-1.8.2.
Add Python-3.6.2.
Add libffi-3.2.1.
Update to eudev-3.2.4.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11303 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 7.3 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-ch6-sbu;</seg>
36 <seg>&python-ch6-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 --with-ensurepip=yes \
52 --enable-unicode=ucs4</userinput></screen>
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
81 <varlistentry>
82 <term><parameter>--enable-unicode=ucs4</parameter></term>
83 <listitem>
84 <para>This switch enables 32bit Unicode support in
85 <application>Python</application>.</para>
86 </listitem>
87 </varlistentry>
88
89 </variablelist>
90
91 <para>Compile the package:</para>
92
93<screen><userinput remap="make">make</userinput></screen>
94
95 <para>The test suite requires TK and and X Windows session and cannot
96 be run until Python 3 is reinstalled in BLFS.</para>
97
98 <para>Install the package:</para>
99
100<screen><userinput remap="install">make install
101chmod -v 755 /usr/lib/libpython3.6m.so
102chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
103
104 <variablelist>
105 <title>The meaning of the install commands:</title>
106
107 <varlistentry>
108 <term><command>chmod -v 755 /usr/lib/libpython3.{6m.,}so</command></term>
109 <listitem>
110 <para>Fix permissions for libraries to be consistent with other
111 libraries.</para>
112 </listitem>
113 </varlistentry>
114
115 </variablelist>
116
117 <para>If desired, install the preformatted documentation:</para>
118
119<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
120
121tar --strip-components=1 \
122 --no-same-owner \
123 --no-same-permissions \
124 -C /usr/share/doc/python-&python-version;/html \
125 -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
126
127 <variablelist>
128 <title>The meaning of the documentation install commands:</title>
129
130 <varlistentry>
131 <term><option>--no-same-owner</option> and --no-same-permissions</term>
132 <listitem>
133 <para>Ensure the installed files have the correct ownership and
134 prermissions. Without these options, using <application>tar</application>
135 will install the package files with the upstream creator's values.
136 </para>
137 </listitem>
138 </varlistentry>
139
140 </variablelist>
141
142 </sect2>
143
144 <sect2 id="contents-python" role="content">
145 <title>Contents of Python 3</title>
146
147 <segmentedlist>
148 <segtitle>Installed Programs</segtitle>
149 <segtitle>Installed Library</segtitle>
150 <segtitle>Installed Directories</segtitle>
151
152 <seglistitem>
153 <seg>
154 2to3, idle3, pydoc3, python3, python3-config, pyvenv
155 </seg>
156 <seg>
157 libpython3.6m.so and libpython3.so
158 </seg>
159 <seg>
160 /usr/include/python3.6m, /usr/lib/python3 and
161 /usr/share/doc/python-&python-version;
162 </seg>
163 </seglistitem>
164 </segmentedlist>
165
166 <variablelist>
167 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
168 <?dbfo list-presentation="list"?>
169 <?dbhtml list-presentation="table"?>
170
171 <varlistentry id="python-2to3">
172 <term><command>2to3</command></term>
173 <listitem>
174 <para>
175 is a <application>Python</application> program that reads
176 <application>Python 2.x</application> source code and applies a
177 series of fixes to transform it into valid
178 <application>Python 3.x</application> code.
179 </para>
180 <indexterm zone="ch-system-Python">
181 <primary sortas="b-2to3">2to3</primary>
182 </indexterm>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry id="idle3">
187 <term><command>idle3</command></term>
188 <listitem>
189 <para>
190 is a wrapper script that opens a <application>Python</application>
191 aware GUI editor. For this script to run, you must have installed
192 <application>Tk</application> before Python so that the Tkinter
193 Python module is built.
194 </para>
195 <indexterm zone="ch-system-Python">
196 <primary sortas="b-idle3">idle3</primary>
197 </indexterm>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry id="pydoc3">
202 <term><command>pydoc3</command></term>
203 <listitem>
204 <para>
205 is the <application>Python</application> documentation tool.
206 </para>
207 <indexterm zone="ch-system-Python">
208 <primary sortas="b-pydoc3">pydoc3</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 <varlistentry id="python3">
214 <term><command>python3</command></term>
215 <listitem>
216 <para>
217 is an interpreted, interactive, object-oriented programming
218 language.
219 </para>
220 <indexterm zone="ch-system-Python">
221 <primary sortas="b-python3">python3</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="pyvenv">
227 <term><command>pyvenv</command></term>
228 <listitem>
229 <para>
230 creates virtual <application>Python</application> environments in
231 one or more target directories.
232 </para>
233 <indexterm zone="ch-system-Python">
234 <primary sortas="b-pyvenv">pyvenv</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 </variablelist>
240
241 </sect2>
242
243</sect1>
244
Note: See TracBrowser for help on using the repository browser.