source: general/prog/python3.xml@ fd69a62

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 fd69a62 was fd69a62, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

Updates to httpd-2.4.9, Python-3.4.0, lcms2-2.6, libFS-1.0.6 and x264-20140316-2245. Several small fixes to Apr-Util-1.5.3, UPower-0.9.23 and Avahi-0.6.3. Thanks Armin K. for discussions.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12874 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 "http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
9 <!ENTITY python3-download-ftp " ">
10 <!ENTITY python3-md5sum "77c22725e14af3d71022cbfdebff4903">
11 <!ENTITY python3-size "14 MB">
12 <!ENTITY python3-buildsize "279 MB (241 MB without docs or additional 143 MB for the tests)">
13 <!ENTITY python3-time "1.1 SBU (or 2.8 SBU for the tests)">
14
15 <!ENTITY python3htmldoc-download-http
16 "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
17 <!ENTITY python3htmldoc-md5sum "cdbef126ee7ef0908352fabc4dc5bee5">
18 <!ENTITY python3htmldoc-size "4.8 MB">
19]>
20
21<sect1 id="python3" xreflabel="Python-&python3-version;">
22 <?dbhtml filename="python3.html" ?>
23
24 <sect1info>
25 <othername>$LastChangedBy$</othername>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>Python-&python3-version;</title>
30
31 <indexterm zone="python3">
32 <primary sortas="a-Python3">Python3</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to Python 3</title>
37
38 <para>
39 The <application>Python 3</application> package contains the
40 <application>Python</application> development environment.
41 This is useful for object-oriented programming, writing scripts,
42 prototyping large programs or developing entire applications.
43 </para>
44
45 &lfs75_checked;
46
47 <bridgehead renderas="sect3">Package Information</bridgehead>
48 <itemizedlist spacing="compact">
49 <listitem>
50 <para>
51 Download (HTTP): <ulink url="&python3-download-http;"/>
52 </para>
53 </listitem>
54 <listitem>
55 <para>
56 Download (FTP): <ulink url="&python3-download-ftp;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download MD5 sum: &python3-md5sum;
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download size: &python3-size;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Estimated disk space required: &python3-buildsize;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated build time: &python3-time;
77 </para>
78 </listitem>
79 </itemizedlist>
80
81 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
82 <itemizedlist spacing="compact">
83 <title>Optional HTML Documentation</title>
84 <listitem>
85 <para>
86 Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
87 </para>
88 </listitem>
89 <listitem>
90 <para>
91 Download MD5 sum: &python3htmldoc-md5sum;
92 </para>
93 </listitem>
94 <listitem>
95 <para>
96 Download size: &python3htmldoc-size;
97 </para>
98 </listitem>
99 </itemizedlist>
100
101 <bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
102
103 <bridgehead renderas="sect4">Recommended</bridgehead>
104 <para role="recommended">
105 <xref linkend="expat"/> and
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>. Remove if you have
197 not installed recommended dependency <xref linkend="expat"/>.
198 </para>
199
200 <para>
201 <option>--with-system-ffi</option>: This switch enables linking against
202 system version of <application>libffi</application>. Remove if you have
203 not installed recommended dependency <xref linkend="libffi"/>.
204 </para>
205
206 <para>
207 <parameter>--with-dbmliborder=bdb:gdbm:ndbm</parameter>: Use this switch
208 if you want to build <application>Python</application> DBM Module
209 against <application>Berkeley DB</application> instead of
210 <application>GDBM</application>.
211 </para>
212
213 <para>
214 <parameter>--without-ensurepip</parameter>: This switch disables building
215 <command>pip</command> and <command>setuptools</command>
216 packaging programs.
217 </para>
218
219 <para>
220 <command>chmod ...</command>: Fix permissions for shared libraries to be
221 consistent with other libraries.
222 </para>
223
224 </sect2>
225
226 <sect2 role="configuration">
227 <title>Configuring Python 3</title>
228
229 <para>
230 In order for <command>python3</command> to find the installed
231 documentation, you must add the following environment variable to
232 individual user's or the system's profile:
233 </para>
234
235<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python3-version;/html</userinput></screen>
236
237 </sect2>
238
239 <sect2 role="content">
240 <title>Contents</title>
241
242 <segmentedlist>
243 <segtitle>Installed Programs</segtitle>
244 <segtitle>Installed Libraries</segtitle>
245 <segtitle>Installed Directories</segtitle>
246
247 <seglistitem>
248 <seg>
249 2to3 (symlink),
250 2to3-&python3-majorver;,
251
252 pydoc3 (symlink),
253 pydoc&python3-majorver;,
254
255 python3 (symlink);
256 python&python3-majorver; and python&python3-majorver;m (hardlinked);
257
258 python3-config (symlink),
259 python&python3-majorver;-config (symlink),
260 python&python3-majorver;m-config,
261
262 pyvenv (symlink),
263 pyvenv&python3-majorver;,
264
265 and optionally, if Tk is installed,
266 idle3 (symlink) and
267 idle&python3-majorver;
268 </seg>
269 <seg>
270 libpython&python3-majorver;m.so and libpython3.so;
271 several under /usr/lib/python3.3/lib-dynload/
272 </seg>
273 <seg>
274 /usr/include/python&python3-majorver;m,
275 /usr/lib/python&python3-majorver;, and
276 /usr/share/doc/python-&python3-version;
277 </seg>
278 </seglistitem>
279 </segmentedlist>
280
281 <variablelist>
282 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
283 <?dbfo list-presentation="list"?>
284 <?dbhtml list-presentation="table"?>
285
286 <varlistentry id="idle3">
287 <term><command>idle3</command></term>
288 <listitem>
289 <para>
290 is a wrapper script that opens a
291 <application>Python</application> aware GUI editor.
292 </para>
293 <indexterm zone="python3 idle3">
294 <primary sortas="b-idle3">idle3</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="pydoc3">
300 <term><command>pydoc3</command></term>
301 <listitem>
302 <para>
303 is the <application>Python</application> documentation
304 tool.
305 </para>
306 <indexterm zone="python3 pydoc3">
307 <primary sortas="b-pydoc3">pydo3c</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="python3-prog">
313 <term><command>python3</command></term>
314 <listitem>
315 <para>
316 is an interpreted, interactive, object-oriented programming
317 language.
318 </para>
319 <indexterm zone="python3 python3-prog">
320 <primary sortas="b-python3">python3</primary>
321 </indexterm>
322 </listitem>
323 </varlistentry>
324
325 <varlistentry id="python-ver">
326 <term><command>python&python3-majorver;</command></term>
327 <listitem>
328 <para>
329 is a version-specific name for the <command>python</command>
330 program.
331 </para>
332 <indexterm zone="python3 python-ver">
333 <primary
334 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
335 </indexterm>
336 </listitem>
337 </varlistentry>
338
339 <varlistentry id="pyvenv">
340 <term><command>pyvenv</command></term>
341 <listitem>
342 <para>
343 creates virtual <application>Python</application> environments in
344 one or more target directories.
345 </para>
346 <indexterm zone="python3 pyvenv">
347 <primary
348 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 </variablelist>
354
355 </sect2>
356
357</sect1>
Note: See TracBrowser for help on using the repository browser.