source: general/prog/python2.xml@ 5d11f8f

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

GLibmm-2.38.1 depends on GnuTLS, thanks sor. Updates to dconf-0.20.0, vte-0.36.0, gnome-icon-theme-symbolic-3.12.0, gnome-themes-standard-3.12.0 and gnome-icon-theme-extras-3.12.0.

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

  • Property mode set to 100644
File size: 10.9 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 "bcf93efa8eaf383c98ed3ce40b763497">
11 <!ENTITY python2-size "9.9 MB">
12 <!ENTITY python2-buildsize "261 MB">
13 <!ENTITY python2-time "1.0 SBU (additional 5.5 SBU for tests)">
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 "7613314d1aaa7dcc522ca9d3fd43dace">
18 <!ENTITY python2htmldoc-size "4.3 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 &lfs75_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 <listitem>
86 <para>
87 Required patch for systems running
88 <application>Readline</application>-6.x (x>2):
89 <ulink url="&patch-root;/Python-&python2-version;-readline_6_3-1.patch"/>
90 </para>
91 </listitem>
92 </itemizedlist>
93
94 <itemizedlist spacing="compact">
95 <title>Optional HTML Documentation</title>
96 <listitem>
97 <para>
98 Download (HTTP): <ulink url="&python2htmldoc-download-http;"/>
99 </para>
100 </listitem>
101 <listitem>
102 <para>
103 Download MD5 sum: &python2htmldoc-md5sum;
104 </para>
105 </listitem>
106 <listitem>
107 <para>
108 Download size: &python2htmldoc-size;
109 </para>
110 </listitem>
111 </itemizedlist>
112
113 <bridgehead renderas="sect3">Python 2 Dependencies</bridgehead>
114
115 <bridgehead renderas="sect4">Recommended</bridgehead>
116 <para role="recommended">
117 <xref linkend="expat"/> and
118 <xref linkend="libffi"/>
119 </para>
120
121 <bridgehead renderas="sect4">Optional</bridgehead>
122 <para role="optional">
123 <xref linkend="bluez"/>
124 </para>
125
126 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
127 <para role="optional">
128 <xref linkend="db"/>,
129 <xref linkend="openssl"/>,
130 <xref linkend="sqlite"/> and
131 <xref linkend="tk"/>
132 </para>
133
134 <para condition="html" role="usernotes">
135 User Notes: <ulink url="&blfs-wiki;/Python"/>
136 </para>
137 </sect2>
138
139 <sect2 role="installation">
140 <title>Installation of Python 2</title>
141
142 <para>
143 Install <application>Python 2</application> by running the following
144 commands:
145 </para>
146
147<screen><userinput>patch -Np1 -i ../Python-&python2-version;-readline_6_3-1.patch &amp;&amp;
148./configure --prefix=/usr \
149 --enable-shared \
150 --with-system-expat \
151 --with-system-ffi \
152 --enable-unicode=ucs4 &amp;&amp;
153make</userinput></screen>
154
155 <para>
156 To test the results, issue: <command>make test</command>.
157 </para>
158
159 <para>
160 Now, as the <systemitem class="username">root</systemitem> user:
161 </para>
162
163<screen role="root"><userinput>make install &amp;&amp;
164chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
165
166 <para>
167 Since <application>Python 2</application> is in maintenance mode, and
168 <application>Python 3</application> is recommended by upstream for
169 development, probably, you do not need to install the documentation.
170 However, if you still want to install documentation for both
171 <application>Python</application> versions, be sure to define PYTHONDOCS
172 variable for the version you want to use, each time you need to consult
173 the documentation. If you have downloaded the preformatted documentation
174 from <ulink url="http://docs.python.org/download.html"/>, install it
175 as the <systemitem class="username">root</systemitem> user:
176 </para>
177
178<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python2-version; &amp;&amp;
179tar --strip-components=1 -C /usr/share/doc/python-&python2-version; \
180 --no-same-owner -xvf ../python-&python2-version;-docs-html.tar.bz2 &amp;&amp;
181find /usr/share/doc/python-&python2-version; -type d -exec chmod 0755 {} \; &amp;&amp;
182find /usr/share/doc/python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
183 </sect2>
184
185 <sect2 role="commands">
186 <title>Command Explanations</title>
187
188 <para>
189 <option>--with-system-expat</option>: This switch enables linking against
190 system version of <application>Expat</application>. Remove if you have
191 not installed <xref linkend="expat"/>.
192 </para>
193
194 <para>
195 <option>--with-system-ffi</option>: This switch enables linking against
196 system version of <application>libffi</application>. Remove if you have
197 not installed <xref linkend="libffi"/>.
198 </para>
199
200 <para>
201 <parameter>--enable-unicode=ucs4</parameter>: This switch enables
202 32bit Unicode support in <application>Python</application>.
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 <command>chmod ...</command>: Fix permissions for libraries to be
214 consistent with other libraries.
215 </para>
216
217 </sect2>
218
219 <sect2 role="configuration">
220 <title>Configuring Python 2</title>
221
222 <para>
223 In order for <command>python</command> to find the installed
224 documentation, you must add the following environment variable to
225 individual user's or the system's profile:
226 </para>
227
228<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python2-version;</userinput></screen>
229
230 </sect2>
231
232 <sect2 role="content">
233 <title>Contents</title>
234
235 <segmentedlist>
236 <segtitle>Installed Programs</segtitle>
237 <segtitle>Installed Library</segtitle>
238 <segtitle>Installed Directories</segtitle>
239
240 <seglistitem>
241 <seg>
242 2to3, pydoc, python, python-config, python2, python2-config,
243 python&python2-majorver;, python&python2-majorver;-config,
244 smtpd.py, and optionally if <application>Tk</application>
245 is installed, idle
246 </seg>
247 <seg>
248 libpython&python2-majorver;.so
249 </seg>
250 <seg>
251 /usr/include/python&python2-majorver;,
252 /usr/lib/python&python2-majorver;, and
253 /usr/share/doc/python-&python2-version;</seg>
254 </seglistitem>
255 </segmentedlist>
256
257 <variablelist>
258 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
259 <?dbfo list-presentation="list"?>
260 <?dbhtml list-presentation="table"?>
261
262 <varlistentry id="python2-2to3">
263 <term><command>2to3</command></term>
264 <listitem>
265 <para>
266 is a <application>Python</application> program that reads
267 <application>Python 2.x</application> source code and applies a series of
268 fixers to transform it into valid <application>Python 3.x</application>
269 code.
270 </para>
271 <indexterm zone="python2 python2-2to3">
272 <primary sortas="b-2to3">2to3</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="idle">
278 <term><command>idle</command></term>
279 <listitem>
280 <para>
281 is a wrapper script that opens a <application>Python</application>
282 aware GUI editor.
283 </para>
284 <indexterm zone="python2 idle">
285 <primary sortas="b-idle">idle</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="pydoc2">
291 <term><command>pydoc</command></term>
292 <listitem>
293 <para>
294 is the <application>Python</application> documentation tool.
295 </para>
296 <indexterm zone="python2 pydoc2">
297 <primary sortas="b-pydoc2">pydoc</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="python">
303 <term><command>python</command></term>
304 <listitem>
305 <para>
306 is an interpreted, interactive, object-oriented programming
307 language.
308 </para>
309 <indexterm zone="python2 python">
310 <primary sortas="b-python2">python</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="python2-ver">
316 <term><command>python&python2-majorver;</command></term>
317 <listitem>
318 <para>
319 is a version-specific name for the <command>python</command>
320 program.
321 </para>
322 <indexterm zone="python2 python2-ver">
323 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="smtpd.py">
329 <term><command>smtpd.py</command></term>
330 <listitem>
331 <para>
332 is an SMTP proxy implemented in <application>Python</application>.
333 </para>
334 <indexterm zone="python2 smtpd.py">
335 <primary sortas="b-smtpd.py">smtpd.py</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 </variablelist>
341
342 </sect2>
343
344</sect1>
Note: See TracBrowser for help on using the repository browser.