source: general/prog/python3.xml@ 3b78237

10.0 10.1 11.0 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 3b78237 was 3b78237, checked in by Pierre Labastie <pieere@…>, 4 years ago

Fix typo connexion->connection at several places)

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19649 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.1 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 <!ENTITY python3-download-http
8 "https://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
9 <!ENTITY python3-download-ftp " ">
10 <!ENTITY python3-md5sum "1325134dd525b4a2c3272a1a0214dd54">
11 <!ENTITY python3-size "16 MB">
12 <!ENTITY python3-buildsize "158 MB (add 30 MB for tests)">
13 <!ENTITY python3-time "0.6 SBU (using parallelism=4; add 3.4 SBU for tests)">
14
15 <!ENTITY python3htmldoc-download-http
16 "https://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
17]>
18
19<sect1 id="python3" xreflabel="Python-&python3-version;">
20 <?dbhtml filename="python3.html" ?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 </sect1info>
26
27 <title>Python-&python3-version;</title>
28
29 <indexterm zone="python3">
30 <primary sortas="a-Python3">Python3</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Python 3</title>
35
36 <para>
37 The <application>Python 3</application> package contains the
38 <application>Python</application> development environment.
39 This is useful for object-oriented programming, writing scripts,
40 prototyping large programs or developing entire applications.
41 </para>
42
43 <note><para><application>Python 3</application> was installed in LFS.
44 The only reason to rebuild it here is if optional modules
45 are needed.</para></note>
46
47 &lfs81_checked;
48
49 <bridgehead renderas="sect3">Package Information</bridgehead>
50 <itemizedlist spacing="compact">
51 <listitem>
52 <para>
53 Download (HTTP): <ulink url="&python3-download-http;"/>
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download (FTP): <ulink url="&python3-download-ftp;"/>
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Download MD5 sum: &python3-md5sum;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Download size: &python3-size;
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Estimated disk space required: &python3-buildsize;
74 </para>
75 </listitem>
76 <listitem>
77 <para>
78 Estimated build time: &python3-time;
79 </para>
80 </listitem>
81 </itemizedlist>
82<!--
83 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
84 <itemizedlist spacing="compact">
85 <title>Optional HTML Documentation</title>
86 <listitem>
87 <para>
88 Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
89 </para>
90 </listitem>
91 </itemizedlist>
92-->
93 <bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
94<!--
95 <bridgehead renderas="sect4">Recommended</bridgehead>
96 <para role="recommended">
97 <xref linkend="libffi"/>
98 </para>
99-->
100 <bridgehead renderas="sect4">Optional</bridgehead>
101 <para role="optional">
102 <xref linkend="bluez"/>,
103 <xref linkend="gdb"/> (required for some tests), and
104 <xref linkend="valgrind"/>
105 </para>
106
107 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
108 <para role="optional">
109 <xref linkend="db"/>,
110 <xref linkend="openssl"/> and
111 <xref linkend="sqlite"/>
112 </para>
113
114 <para condition="html" role="usernotes">User Notes:
115 <ulink url="&blfs-wiki;/Python3"/>
116 </para>
117 </sect2>
118
119 <sect2 role="installation">
120 <title>Installation of Python 3</title>
121
122 <para>
123 Install <application>Python 3</application> by running the following
124 commands:
125 </para>
126
127<screen><userinput>CXX="/usr/bin/g++" \
128./configure --prefix=/usr \
129 --enable-shared \
130 --with-system-expat \
131 --with-system-ffi \
132 --with-ensurepip=yes &amp;&amp;
133make</userinput></screen>
134
135 <para>
136 The test suite must be run separately, using an X terminal (see below).
137 </para>
138
139 <para>
140 Now, as the <systemitem class="username">root</systemitem> user:
141 </para>
142
143<screen role="root"><userinput>make install &amp;&amp;
144chmod -v 755 /usr/lib/libpython&python3-majorver;m.so &amp;&amp;
145chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
146<!--
147 <para>
148 If you have downloaded the preformatted documentation from
149 <ulink url="http://docs.python.org/download.html"/>, install it
150 as the <systemitem class="username">root</systemitem> user:
151 </para>
152
153<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python3-version;/html &amp;&amp;
154tar - -strip-components=1 \
155 - -no-same-owner \
156 - -no-same-permissions \
157 -C /usr/share/doc/python-&python3-version;/html \
158 -xvf ../python-&python3-version;-docs-html.tar.bz2</userinput></screen>
159-->
160 <para>
161 The test suite must be run separately from the build, either before or
162 after the package is built and installed. Do not run
163 <command>make install</command>, after running the test suite. To build
164 and install the package, you need to start with a fresh or clean source
165 tree. For the test, you also need a clean source code, so either start by
166 removing the source code directory and starting over, by uncompressing
167 the source tarball or by running <command>make clean</command>. Then
168 configure again, adding <quote>--with-pydebug</quote> to the
169 <command>configure</command> switches above, run <command>make</command>,
170 then <command>make test</command>. Remember that tests must be executed
171 using an X terminal. One test fails. The test SBU highly depends on the
172 speed of the internet connection.
173 </para>
174
175 </sect2>
176
177 <sect2 role="commands">
178 <title>Command Explanations</title>
179
180 <para>
181 <command> CXX="/usr/bin/g++" ./configure ...</command>: Avoid an annoying
182 message during configuration.
183 </para>
184
185 <para>
186 <parameter>--with-system-expat</parameter>: This switch enables linking
187 against the system version of <application>Expat</application>.
188 </para>
189
190 <para>
191 <parameter>--with-system-ffi</parameter>: This switch enables linking
192 against system version of <application>libffi</application>.
193 </para>
194
195 <para>
196 <parameter>--with-ensurepip=yes</parameter> : This switch enables building
197 <command>pip</command> and <command>setuptools</command> packaging programs.
198 <command>setuptools</command> is needed for building some Python modules.
199 </para>
200
201 <para>
202 <option>--with-dbmliborder=bdb:gdbm:ndbm</option>: Use this switch
203 if you want to build <application>Python</application> DBM Module
204 against <application>Berkeley DB</application> instead of
205 <application>GDBM</application>.
206 </para>
207
208 <para>
209 <command>chmod ...</command>: Fix permissions for shared libraries to be
210 consistent with other libraries.
211 </para>
212
213 </sect2>
214
215 <sect2 role="configuration">
216 <title>Configuring Python 3</title>
217
218 <para>
219 In order for <command>python3</command> to find the installed
220 documentation, create the following version independent symlink:
221 </para>
222
223<screen role="root"><userinput>ln -svfn python-&python3-version; /usr/share/doc/python-3</userinput></screen>
224
225 <para>
226 and add the following environment variable to the individual user's or
227 system's profile:
228 </para>
229
230<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-3/html</userinput></screen>
231
232 </sect2>
233
234 <sect2 role="content">
235 <title>Contents</title>
236
237 <segmentedlist>
238 <segtitle>Installed Programs</segtitle>
239 <segtitle>Installed Libraries</segtitle>
240 <segtitle>Installed Directories</segtitle>
241
242 <seglistitem>
243 <seg>
244 2to3 (symlink),
245 2to3-&python3-majorver;,
246
247 idle3 (symlink), and
248 idle&python3-majorver;
249
250 pydoc3 (symlink),
251 pydoc&python3-majorver;,
252
253 python3 (symlink);
254 python&python3-majorver; and python&python3-majorver;m (hardlinked);
255
256 python3-config (symlink),
257 python&python3-majorver;-config (symlink),
258 python&python3-majorver;m-config,
259
260 pyvenv (symlink),
261 pyvenv-&python3-majorver;,
262 </seg>
263 <seg>
264 libpython&python3-majorver;m.so and libpython3.so
265 </seg>
266 <seg>
267 /usr/include/python&python3-majorver;m,
268 /usr/lib/python&python3-majorver;, and
269 /usr/share/doc/python-&python3-version;
270 </seg>
271 </seglistitem>
272 </segmentedlist>
273
274 <variablelist>
275 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
276 <?dbfo list-presentation="list"?>
277 <?dbhtml list-presentation="table"?>
278
279 <varlistentry id="idle3">
280 <term><command>idle3</command></term>
281 <listitem>
282 <para>
283 is a wrapper script that opens a <application>Python</application>
284 aware GUI editor. For this script to run, you must have installed
285 <application>Tk</application> before Python so that the Tkinter
286 Python module is built.
287 </para>
288 <indexterm zone="python3 idle3">
289 <primary sortas="b-idle3">idle3</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="pydoc3">
295 <term><command>pydoc3</command></term>
296 <listitem>
297 <para>
298 is the <application>Python</application> documentation
299 tool.
300 </para>
301 <indexterm zone="python3 pydoc3">
302 <primary sortas="b-pydoc3">pydo3c</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="python3-prog">
308 <term><command>python3</command></term>
309 <listitem>
310 <para>
311 is an interpreted, interactive, object-oriented programming
312 language.
313 </para>
314 <indexterm zone="python3 python3-prog">
315 <primary sortas="b-python3">python3</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="python-ver">
321 <term><command>python&python3-majorver;</command></term>
322 <listitem>
323 <para>
324 is a version-specific name for the <command>python</command>
325 program.
326 </para>
327 <indexterm zone="python3 python-ver">
328 <primary
329 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="pyvenv">
335 <term><command>pyvenv</command></term>
336 <listitem>
337 <para>
338 creates virtual <application>Python</application> environments in
339 one or more target directories.
340 </para>
341 <indexterm zone="python3 pyvenv">
342 <primary
343 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
344 </indexterm>
345 </listitem>
346 </varlistentry>
347
348 </variablelist>
349
350 </sect2>
351
352</sect1>
Note: See TracBrowser for help on using the repository browser.