source: general/prog/python2.xml@ 7b273030

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 7b273030 was 7b273030, checked in by Bruce Dubbs <bdubbs@…>, 9 years ago

Tags through Xorg

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

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