source: general/prog/python2.xml@ 0d7900a

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 0d7900a was 0d7900a, checked in by Randy McMurchy <randy@…>, 11 years ago

Removed extraneous spaces from blank lines and at the end of lines in the .xml

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

  • Property mode set to 100644
File size: 11.8 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 python2-download-http
8 "http://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
9 <!ENTITY python2-download-ftp " ">
10 <!ENTITY python2-md5sum "62c4c1699170078c469f79ddfed21bc0">
11 <!ENTITY python2-size "9.6 MB">
12 <!ENTITY python2-buildsize "235 MB (not including the test suite)">
13 <!ENTITY python2-time "1.1 SBU (not including the test suite)">
14
15 <!ENTITY python2htmldoc-download-http
16 "http://docs.python.org/ftp/python/doc/&python2-version;/python-&python2-version;-docs-html.tar.bz2">
17 <!ENTITY python2htmldoc-md5sum "101c13d39f76fd6706aac3a9196b2f01">
18 <!ENTITY python2htmldoc-size "4.2 MB">
19]>
20
21<sect1 id="python2" xreflabel="Python-&python2-version;">
22 <?dbhtml filename="python2.html" ?>
23
24 <sect1info>
25 <othername>$LastChangedBy$</othername>
26 <date>$Date$</date>
27 </sect1info>
28
29 <title>Python-&python2-version;</title>
30
31 <indexterm zone="python2">
32 <primary sortas="a-Python2">Python2</primary>
33 </indexterm>
34
35 <sect2 role="package">
36 <title>Introduction to Python 2</title>
37
38 <para>
39 The <application>Python 2</application> package contains the
40 <application>Python</application> development environment. It is useful
41 for object-oriented programming, writing scripts, prototyping large
42 programs or developing entire applications. This version is for backward
43 compatibility with other dependent packages.
44 </para>
45
46 &lfs72_checked;
47
48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>
52 Download (HTTP): <ulink url="&python2-download-http;"/>
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download (FTP): <ulink url="&python2-download-ftp;"/>
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download MD5 sum: &python2-md5sum;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Download size: &python2-size;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Estimated disk space required: &python2-buildsize;
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Estimated build time: &python2-time;
78 </para>
79 </listitem>
80 </itemizedlist>
81
82 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
83
84 <itemizedlist spacing="compact">
85 <title>Optional HTML Documentation</title>
86 <listitem>
87 <para>
88 Download (HTTP): <ulink url="&python2htmldoc-download-http;"/>
89 </para>
90 </listitem>
91 <listitem>
92 <para>
93 Download MD5 sum: &python2htmldoc-md5sum;
94 </para>
95 </listitem>
96 <listitem>
97 <para>
98 Download size: &python2htmldoc-size;
99 </para>
100 </listitem>
101 </itemizedlist>
102
103 <bridgehead renderas="sect3">Additional Patches</bridgehead>
104 <itemizedlist spacing="compact">
105 <listitem>
106 <para>
107 Required patch:
108 <ulink url="&patch-root;/Python-&python2-version;-bsddb_fix-1.patch"/>
109 </para>
110 </listitem>
111 </itemizedlist>
112
113 <bridgehead renderas="sect3">Python Dependencies</bridgehead>
114
115 <bridgehead renderas="sect4">Recommended</bridgehead>
116 <para role="recommended">
117 <xref linkend="expat"/>,
118 <xref linkend="libffi"/> and
119 <xref linkend="pkgconfig"/>
120 </para>
121
122 <bridgehead renderas="sect4">Optional</bridgehead>
123 <para role="optional">
124 <xref linkend="bluez"/> and
125 <ulink url="http://sphinx.pocoo.org/">Sphinx</ulink>
126 </para>
127
128 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
129 <para role="optional">
130 <xref linkend="db"/>,
131 <xref linkend="openssl"/>,
132 <xref linkend="sqlite"/> and
133 <xref linkend="tk"/>
134 </para>
135
136 <para condition="html" role="usernotes">
137 User Notes: <ulink url="&blfs-wiki;/Python"/>
138 </para>
139 </sect2>
140
141 <sect2 role="installation">
142 <title>Installation of Python</title>
143
144 <para>
145 Install <application>Python</application> by running the following
146 commands:
147 </para>
148
149<screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
150patch -Np1 -i ../Python-&python2-version;-bsddb_fix-1.patch &amp;&amp;
151./configure --prefix=/usr \
152 --enable-shared \
153 --with-system-expat \
154 --with-system-ffi \
155 --enable-unicode=ucs4 &amp;&amp;
156make</userinput></screen>
157
158 <para>
159 To test the results, issue: <command>make test</command>.
160 </para>
161
162 <para>
163 In order to use the <command>help ('name_string')</command> feature of the
164 <command>python</command> interpreter with some statements and keywords,
165 you must create or download the optional HTML documentation.
166 </para>
167
168 <para>
169 If you have installed <ulink url="http://sphinx.pocoo.org/">Sphinx</ulink>
170 and wish to create the HTML documentation:
171 </para>
172
173<screen><userinput>make -C Doc html</userinput></screen>
174
175 <para>
176 Now, as the <systemitem class="username">root</systemitem> user:
177 </para>
178
179<screen role="root"><userinput>make install &amp;&amp;
180chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
181
182 <para>
183 If you created the html documentation with
184 <application>Sphinx</application> then install it as the
185 <systemitem class="username">root</systemitem> user:
186 </para>
187
188<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python2-version; &amp;&amp;
189cp -rfv Doc/build/html/* /usr/share/doc/python-&python2-version;</userinput></screen>
190
191 <para>
192 Alternatively, you can download preformatted documentation from
193 <ulink url="http://docs.python.org/download.html"/> and install it as the
194 <systemitem class="username">root</systemitem> user:
195 </para>
196
197<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python2-version; &amp;&amp;
198tar --strip-components=1 -C /usr/share/doc/Python-&python2-version; \
199 -xvf ../python-&python2-version;-docs-html.tar.bz2 &amp;&amp;
200find /usr/share/doc/Python-&python2-version; -type d -exec chmod 0755 {} \; &amp;&amp;
201find /usr/share/doc/Python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
202 </sect2>
203
204 <sect2 role="commands">
205 <title>Command Explanations</title>
206
207 <para>
208 <command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command is
209 used to fix a build problem with the <application>GDBM</application>
210 library.
211 </para>
212
213 <para>
214 <option>--with-system-expat</option>: This switch enables linking against
215 system version of <application>Expat</application>. Remove if you have
216 not installed recommended dependency <xref linkend="expat"/>.
217 </para>
218
219 <para>
220 <option>--with-system-ffi</option>: This switch enables linking against
221 system version of <application>libffi</application>. Remove if you have
222 not installed recommended dependency <xref linkend="libffi"/>.
223 </para>
224
225 <para>
226 <parameter>--enable-unicode=ucs4</parameter>: This switch enables
227 32bit Unicode support in <application>Python</application>.
228 </para>
229
230 <para>
231 <parameter>--with-dbmliborder=bdb:gdbm:ndbm</parameter>: Use this switch
232 if you want to build <application>Python</application> DBM Module
233 against <application>Berkeley DB</application> instead of
234 <application>GDBM</application>.
235 </para>
236
237 <para>
238 <command>chmod ...</command>: Fix permissions for libraries to be
239 consistent with other libraries.
240 </para>
241
242 </sect2>
243
244 <sect2 role="configuration">
245 <title>Configuring Python 2</title>
246
247 <para>
248 In order for <command>python</command> to find the installed
249 documentation, you must add the following environment variable to
250 individual user's or the system's profile:
251 </para>
252
253<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python2-version;</userinput></screen>
254
255 </sect2>
256
257 <sect2 role="content">
258 <title>Contents</title>
259
260 <segmentedlist>
261 <segtitle>Installed Programs</segtitle>
262 <segtitle>Installed Libraries</segtitle>
263 <segtitle>Installed Directories</segtitle>
264
265 <seglistitem>
266 <seg>
267 2to3, pydoc, python, python-config, python&python2-majorver;,
268 python&python2-majorver;-config, smtpd.py, and optionally if
269 <application>Tk</application> is installed, idle
270 </seg>
271 <seg>
272 libpython&python2-majorver;.so and numerous modules installed in
273 /usr/lib/python&python2-majorver;/lib-dynload
274 </seg>
275 <seg>
276 /usr/include/python&python2-majorver;,
277 /usr/lib/python&python2-majorver;, and
278 /usr/share/doc/python-&python2-version;</seg>
279 </seglistitem>
280 </segmentedlist>
281
282 <variablelist>
283 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
284 <?dbfo list-presentation="list"?>
285 <?dbhtml list-presentation="table"?>
286
287 <varlistentry id="python2-2to3">
288 <term><command>2to3</command></term>
289 <listitem>
290 <para>
291 is a <application>Python</application> program that reads
292 <application>Python 2.x</application> source code and applies a series of
293 fixers to transform it into valid <application>Python 3.x</application>
294 code.
295 </para>
296 <indexterm zone="python2 python2-2to3">
297 <primary sortas="b-2to3">2to3</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="idle2">
303 <term><command>idle</command></term>
304 <listitem>
305 <para>
306 is a wrapper script that opens a <application>Python</application>
307 aware GUI editor.
308 </para>
309 <indexterm zone="python2 idle2">
310 <primary sortas="b-idle2">idle</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="pydoc2">
316 <term><command>pydoc</command></term>
317 <listitem>
318 <para>
319 is the <application>Python</application> documentation tool.
320 </para>
321 <indexterm zone="python2 pydoc2">
322 <primary sortas="b-pydoc2">pydoc</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry id="python">
328 <term><command>python</command></term>
329 <listitem>
330 <para>
331 is an interpreted, interactive, object-oriented programming
332 language.
333 </para>
334 <indexterm zone="python2 python">
335 <primary sortas="b-python2">python</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="python2-ver">
341 <term><command>python&python2-majorver;</command></term>
342 <listitem>
343 <para>
344 is a version-specific name for the <command>python</command>
345 program.
346 </para>
347 <indexterm zone="python2 python2-ver">
348 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="smtpd.py2">
354 <term><command>smtpd.py</command></term>
355 <listitem>
356 <para>
357 is an SMTP proxy implemented in <application>Python</application>.
358 </para>
359 <indexterm zone="python2 smtpd.py2">
360 <primary sortas="b-smtpd.py2">smtpd.py</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 </variablelist>
366
367 </sect2>
368
369</sect1>
Note: See TracBrowser for help on using the repository browser.