source: general/prog/python2.xml@ a3394a71

systemd-13485
Last change on this file since a3394a71 was a3394a71, checked in by Douglas R. Reno <renodr@…>, 9 years ago

First round of tags for the day.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16502 af4574ff-66df-0310-9fd7-8a98e5e911e0

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