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

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

Add keybinder2-0.3.0.
Update to lxpanel-0.8.0.
xfce4-mixer-4.10.0: uncomment keybinder and replace broken ulink by xref.
Python-2.7.8, SeaMonkey-2.31, Firefox-34.0. and Thunderbird-31.3.0:

replace /usr/lib/python2.7 by /usr/lib/python&python2-majorver;.

libxklavier-5.3: typo.

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

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