source: general/prog/python2.xml@ a2bb269

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 a2bb269 was a2bb269, checked in by Ken Moffat <ken@…>, 9 years ago

Remove obsolete Berkeley-DB dependency from Python2.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@16403 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 python2-download-http
8 "https://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
9 <!ENTITY python2-download-ftp " ">
10 <!ENTITY python2-md5sum "c685ef0b8e9f27b5e3db5db12b268ac6">
11 <!ENTITY python2-size "12 MB">
12 <!ENTITY python2-buildsize "227 MB (additional 18 MB for the tests)">
13 <!ENTITY python2-time "0.8 SBU (additional 5.5 SBU for tests)">
14
15 <!ENTITY python2htmldoc-download-http
16 "https://docs.python.org/2.7/archives/python-&python2-version;-docs-html.tar.bz2">
17 <!ENTITY python2htmldoc-md5sum "5f07d5079327be83f450ecc459ffe249">
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 &lfs78_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">Python 2 Dependencies</bridgehead>
104
105 <bridgehead renderas="sect4">Recommended</bridgehead>
106 <para role="recommended">
107 <xref linkend="libffi"/>
108 </para>
109
110 <bridgehead renderas="sect4">Optional</bridgehead>
111 <para role="optional">
112 <xref linkend="bluez"/> and
113 <xref linkend="valgrind"/>
114 </para>
115
116 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
117 <para role="optional">
118 <xref linkend="openssl"/>,
119 <xref linkend="sqlite"/> and
120 <xref linkend="tk"/>
121 </para>
122
123 <note>
124 <para>
125 <!-- new for ff31. Any reasonable version of openssl will do,
126 even old maintained versions, so do not xref openssl here -->
127 If you are building <xref linkend="thunderbird"/> or
128 <xref linkend="firefox"/>
129 you must install <application>openssl</application> before you build
130 <application>Python 2</application>.
131 </para>
132 </note>
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>./configure --prefix=/usr \
148 --enable-shared \
149 --with-system-expat \
150 --with-system-ffi \
151 --enable-unicode=ucs4 &amp;&amp;
152make</userinput></screen>
153
154 <para>
155 To test the results, issue: <command>make -k test</command>.
156 One test fails for unknown reasons.
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, you probably 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 the
172 <envar>PYTHONDOCS</envar>
173 variable for the version you want to use, each time you need to consult
174 the documentation. If you have downloaded the preformatted documentation
175 from <ulink url="http://docs.python.org/download.html"/>, install it
176 as the <systemitem class="username">root</systemitem> user:
177 </para>
178
179<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python2-version; &amp;&amp;
180
181tar --strip-components=1 \
182 --no-same-owner \
183 --directory /usr/share/doc/python-&python2-version; \
184 -xvf ../python-&python2-version;-docs-html.tar.bz2 &amp;&amp;
185
186find /usr/share/doc/python-&python2-version; -type d -exec chmod 0755 {} \; &amp;&amp;
187find /usr/share/doc/python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
188 </sect2>
189
190 <sect2 role="commands">
191 <title>Command Explanations</title>
192
193 <para>
194 <option>--with-system-expat</option>: This switch enables linking against
195 system version of <application>Expat</application>.
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 <xref linkend="libffi"/>.
202 </para>
203
204 <para>
205 <parameter>--enable-unicode=ucs4</parameter>: This switch enables
206 32bit Unicode support in <application>Python</application>.
207 </para>
208
209 <para>
210 <parameter>--with-dbmliborder=bdb:gdbm:ndbm</parameter>: Use this switch
211 if you want to build <application>Python</application> DBM Module
212 against <application>Berkeley DB</application> instead of
213 <application>GDBM</application>.
214 </para>
215
216 <para>
217 <command>chmod ...</command>: Fix permissions for libraries to be
218 consistent with other libraries.
219 </para>
220
221 </sect2>
222
223 <sect2 role="configuration">
224 <title>Configuring Python 2</title>
225
226 <para>
227 In order for <command>python</command> to find the installed
228 documentation, you must add the following environment variable to
229 individual user's or the system's profile:
230 </para>
231
232<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python2-version;</userinput></screen>
233
234 </sect2>
235
236 <sect2 role="content">
237 <title>Contents</title>
238
239 <segmentedlist>
240 <segtitle>Installed Programs</segtitle>
241 <segtitle>Installed Library</segtitle>
242 <segtitle>Installed Directories</segtitle>
243
244 <seglistitem>
245 <seg>
246 2to3, pydoc, python (symlink), python-config (symlink),
247 python2 (symlink), python2-config (symlink),
248 python&python2-majorver;, python&python2-majorver;-config,
249 smtpd.py, and idle
250 </seg>
251 <seg>
252 libpython&python2-majorver;.so
253 </seg>
254 <seg>
255 /usr/include/python&python2-majorver;,
256 /usr/lib/python&python2-majorver;, and
257 /usr/share/doc/python-&python2-version;</seg>
258 </seglistitem>
259 </segmentedlist>
260
261 <variablelist>
262 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
263 <?dbfo list-presentation="list"?>
264 <?dbhtml list-presentation="table"?>
265
266 <varlistentry id="python2-2to3">
267 <term><command>2to3</command></term>
268 <listitem>
269 <para>
270 is a <application>Python</application> program that reads
271 <application>Python 2.x</application> source code and applies a series of
272 fixers to transform it into valid <application>Python 3.x</application>
273 code.
274 </para>
275 <indexterm zone="python2 python2-2to3">
276 <primary sortas="b-2to3">2to3</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="idle">
282 <term><command>idle</command></term>
283 <listitem>
284 <para>
285 is a wrapper script that opens a <application>Python</application>
286 aware GUI editor. For this script to run, you must have installed
287 <application>Tk</application> before Python so that the Tkinter
288 Python module is built.
289 </para>
290 <indexterm zone="python2 idle">
291 <primary sortas="b-idle">idle</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="pydoc2">
297 <term><command>pydoc</command></term>
298 <listitem>
299 <para>
300 is the <application>Python</application> documentation tool.
301 </para>
302 <indexterm zone="python2 pydoc2">
303 <primary sortas="b-pydoc2">pydoc</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="python">
309 <term><command>python</command></term>
310 <listitem>
311 <para>
312 is an interpreted, interactive, object-oriented programming
313 language.
314 </para>
315 <indexterm zone="python2 python">
316 <primary sortas="b-python2">python</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="python2-ver">
322 <term><command>python&python2-majorver;</command></term>
323 <listitem>
324 <para>
325 is a version-specific name for the <command>python</command>
326 program.
327 </para>
328 <indexterm zone="python2 python2-ver">
329 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="smtpd.py">
335 <term><command>smtpd.py</command></term>
336 <listitem>
337 <para>
338 is an SMTP proxy implemented in <application>Python</application>.
339 </para>
340 <indexterm zone="python2 smtpd.py">
341 <primary sortas="b-smtpd.py">smtpd.py</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 </variablelist>
347
348 </sect2>
349
350</sect1>
Note: See TracBrowser for help on using the repository browser.