source: general/prog/python3.xml@ 39372bab

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 39372bab was 39372bab, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Python-3.4.1, cups-1.7.3, mpg123-1.20.0, libogg-1.3.2 and xkeyboard-config-2.12. Fix transmission-2.83 to build with Qt-4.8.6, thanks to e5g6s. Fix typo in users.xml, so the book renders.

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

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