source: general/prog/python3.xml@ 355495ce

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 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 355495ce was 355495ce, checked in by Krejzi <krejzi@…>, 12 years ago

Boost 1.50.0, cURL 7.26.0, GLib 2.32.4, ICU 49.1.2, PCRE 8.31 and Python 3.2.3 updates. r128 xorg driver version 6.8.1 -> 6.8.2

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

  • Property mode set to 100644
File size: 10.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 <!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 "187564726f2c1473d301c586acc24847">
11 <!ENTITY python3-size "8.6 MB">
12 <!ENTITY python3-buildsize "200 MB (30 MB for the test suite)">
13 <!ENTITY python3-time "1.0 SBU (additional 3.0 SBU to run the test suite)">
14 <!ENTITY python3htmldoc-download-http
15 "http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
16 <!ENTITY python3htmldoc-md5sum "c970e7bcbc3268a3dbc2de5c15b5a3d3">
17 <!ENTITY python3htmldoc-size "4.2 MB">
18
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">Python</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to Python</title>
37
38 <para>
39 The <application>Python</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 &lfs71_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 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 </para>
113
114 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
115 <para role="optional">
116 <xref linkend="db"/>
117 <xref linkend="openssl"/>,
118 <xref linkend="sqlite"/> and
119 <xref linkend="tk"/>
120 </para>
121
122 <para condition="html" role="usernotes">User Notes:
123 <ulink url="&blfs-wiki;/Python3"/>
124 </para>
125 </sect2>
126
127 <sect2 role="installation">
128 <title>Installation of Python</title>
129
130 <para>
131 Install <application>Python</application> by running the following
132 commands:
133 </para>
134
135<screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
136./configure --prefix=/usr \
137 --enable-shared \
138 --with-wide-unicode \
139 --with-system-expat \
140 --with-system-ffi &amp;&amp;
141make</userinput></screen>
142
143 <para>
144 To test the results, issue: <command>make test</command>. Note that
145 if you have an existing <application>Python</application> installation
146 which includes the <application>PyXML</application> module, the tests could
147 produce a segmentation fault.
148 </para>
149
150 <para>
151 Now, as the <systemitem class="username">root</systemitem> user:
152 </para>
153
154<screen role="root"><userinput>make install &amp;&amp;
155chmod -v 755 /usr/lib/libpython&python3-majorver;mu.so &amp;&amp;
156chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
157
158 <para>
159 There is no documentation installed using the instructions above.
160 See the <filename>Doc/README.txt</filename> file in the source
161 distribution for instructions on how to create the html. Alternatively,
162 you can download preformatted documentation from
163 <ulink url="http://docs.python.org/download.html"/>.
164 </para>
165
166 <para>
167 In order to use the <command>help ('name_string')</command> feature
168 of the <command>python</command> interpreter with some statements and
169 keywords, you must download (or create) the optional HTML documentation
170 and install it. If you downloaded the HTML docs, issue the following
171 commands as the <systemitem class="username">root</systemitem> user:
172 </para>
173
174<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python3-version;/html &amp;&amp;
175tar --strip-components=1 \
176 --no-same-owner \
177 --no-same-permissions \
178 -C /usr/share/doc/Python-&python3-version;/html \
179 -xvf ../python-&python3-version;-docs-html.tar.bz2</userinput></screen>
180
181 </sect2>
182
183 <sect2 role="commands">
184 <title>Command Explanations</title>
185
186 <para>
187 <command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
188 is used to fix a build problem with the <application>GDBM</application>
189 library.
190 </para>
191
192 <para>
193 <option>--with-sytem-expat</option>: This switch enables linking against
194 system version of <application>Expat</application>. Remove if you have
195 not installed recommended dependency <xref linkend="expat"/>.
196 </para>
197
198 <para>
199 <option>--with-system-ffi</option>: This switch enables linking against
200 system version of <application>libffi</application>. Remove if you have
201 not installed recommended dependency <xref linkend="libffi"/>.
202 </para>
203
204 <para>
205 <command>chmod ...</command>: Fix permissions for shared libraries to be
206 consistent with other libraries.
207 </para>
208
209 </sect2>
210
211 <sect2 role="configuration">
212 <title>Configuring Python</title>
213
214 <para>
215 In order for <command>python</command> to find the installed
216 documentation, you must add the following environment variable to
217 individual user's or the system's profile:
218 </para>
219
220<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python3-version;/html</userinput></screen>
221
222 </sect2>
223
224 <sect2 role="content">
225 <title>Contents</title>
226
227 <segmentedlist>
228 <segtitle>Installed Programs</segtitle>
229 <segtitle>Installed Libraries</segtitle>
230 <segtitle>Installed Directories</segtitle>
231
232 <seglistitem>
233 <seg>
234 2to3 (symbolic link to 2to3-&python3-majorver;),
235 2to3-&python3-majorver;,
236
237 pydoc3 (symbolic link to pydoc&python3-majorver;),
238 pydoc&python3-majorver;,
239
240 python3 (hard link to python&python3-majorver;mu),
241 python&python3-majorver; (hard link to python&python3-majorver;mu),
242 python&python3-majorver;mu,
243
244 python3-config (symbolic link to python&python3-majorver;-config),
245 python&python3-majorver;-config (symbolic link to python3-config),
246 python&python3-majorver;mu-config,
247
248 and optionally if Tk is installed,
249 idle3 (symbolic link to idle&python3-majorver;),
250 idle&python3-majorver;
251 </seg>
252 <seg>
253 libpython&python3-majorver;mu.so, libpython3.so and numerous
254 modules installed in /usr/lib/python&python3-majorver;
255 </seg>
256 <seg>
257 /usr/include/python&python3-majorver;mu,
258 /usr/lib/python&python3-majorver;, and
259 /usr/share/doc/python-&python3-version;
260 </seg>
261 </seglistitem>
262 </segmentedlist>
263
264 <variablelist>
265 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
266 <?dbfo list-presentation="list"?>
267 <?dbhtml list-presentation="table"?>
268
269 <varlistentry id="idle3">
270 <term><command>idle3</command></term>
271 <listitem>
272 <para>
273 is a wrapper script that opens a
274 <application>Python</application> aware GUI editor.
275 </para>
276 <indexterm zone="python3 idle3">
277 <primary sortas="b-idle3">idle3</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="pydoc3">
283 <term><command>pydoc3</command></term>
284 <listitem>
285 <para>
286 is the <application>Python</application> documentation
287 tool.
288 </para>
289 <indexterm zone="python3 pydoc3">
290 <primary sortas="b-pydoc3">pydo3c</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="python3-prog">
296 <term><command>python3</command></term>
297 <listitem>
298 <para>
299 is an interpreted, interactive, object-oriented programming
300 language.
301 </para>
302 <indexterm zone="python3 python3-prog">
303 <primary sortas="b-python3">python3</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="python-ver">
309 <term><command>python&python3-majorver;</command></term>
310 <listitem>
311 <para>
312 is a version-specific name for the <command>python</command>
313 program.
314 </para>
315 <indexterm zone="python3 python-ver">
316 <primary
317 sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 </variablelist>
323
324 </sect2>
325
326</sect1>
Note: See TracBrowser for help on using the repository browser.