source: general/prog/python2.xml@ 17d8bc7

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

More Tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16992 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 "https://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
9 <!ENTITY python2-download-ftp " ">
10 <!ENTITY python2-md5sum "1dbcc848b4cd8399a8199d000f9f823c">
11 <!ENTITY python2-size "12 MB">
12 <!ENTITY python2-buildsize "229 MB (additional 18 MB for the tests)">
13 <!ENTITY python2-time "0.8 SBU (additional 5.6 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]>
18
19<sect1 id="python2" xreflabel="Python-&python2-version;">
20 <?dbhtml filename="python2.html" ?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 </sect1info>
26
27 <title>Python-&python2-version;</title>
28
29 <indexterm zone="python2">
30 <primary sortas="a-Python2">Python2</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to Python 2</title>
35
36 <para>
37 The <application>Python 2</application> package contains the
38 <application>Python</application> development environment. It is useful
39 for object-oriented programming, writing scripts, prototyping large
40 programs or developing entire applications. This version is for backward
41 compatibility with other dependent packages.
42 </para>
43
44 &lfs79_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&python2-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&python2-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &python2-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &python2-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &python2-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &python2-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
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 </itemizedlist>
90
91 <bridgehead renderas="sect3">Python 2 Dependencies</bridgehead>
92
93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
95 <xref linkend="libffi"/>
96 </para>
97
98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <xref linkend="bluez"/> and
101 <xref linkend="valgrind"/>
102 </para>
103
104 <bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
105 <para role="optional">
106 <xref linkend="openssl"/>,
107 <xref linkend="sqlite"/> and
108 <xref linkend="tk"/>
109 </para>
110
111 <note>
112 <para>
113 <!-- new for ff31. Any reasonable version of openssl will do,
114 even old maintained versions, so do not xref openssl here
115 Same thing for Seamonkey AFAIK now. I tried it on an older build
116 earlier. -->
117 If you are building <xref linkend="thunderbird"/>,
118 <xref linkend="firefox"/>, or <xref linkend="seamonkey"/>,
119 you must install <application>OpenSSL</application> before you build
120 <application>Python 2</application>.
121 </para>
122 </note>
123
124 <para condition="html" role="usernotes">
125 User Notes: <ulink url="&blfs-wiki;/Python"/>
126 </para>
127 </sect2>
128
129 <sect2 role="installation">
130 <title>Installation of Python 2</title>
131
132 <para>
133 Install <application>Python 2</application> by running the following
134 commands:
135 </para>
136
137<screen><userinput>./configure --prefix=/usr \
138 --enable-shared \
139 --with-system-expat \
140 --with-system-ffi \
141 --enable-unicode=ucs4 &amp;&amp;
142make</userinput></screen>
143
144 <para>
145 To test the results, issue: <command>make -k test</command>.
146 Some tests fail for unknown reasons.
147 </para>
148
149 <para>
150 Now, as the <systemitem class="username">root</systemitem> user:
151 </para>
152
153<screen role="root"><userinput>make install &amp;&amp;
154chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
155
156 <para>
157 Since <application>Python 2</application> is in maintenance mode, and
158 <application>Python 3</application> is recommended by upstream for
159 development, you probably do not need to install the documentation.
160 However, if you still want to install documentation for both
161 <application>Python</application> versions, be sure to define the
162 <envar>PYTHONDOCS</envar>
163 variable for the version you want to use, each time you need to consult
164 the documentation. If you have downloaded the preformatted documentation
165 from <ulink url="http://docs.python.org/download.html"/>, install it
166 as the <systemitem class="username">root</systemitem> user:
167 </para>
168
169<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python2-version; &amp;&amp;
170
171tar --strip-components=1 \
172 --no-same-owner \
173 --directory /usr/share/doc/python-&python2-version; \
174 -xvf ../python-&python2-version;-docs-html.tar.bz2 &amp;&amp;
175
176find /usr/share/doc/python-&python2-version; -type d -exec chmod 0755 {} \; &amp;&amp;
177find /usr/share/doc/python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
178 </sect2>
179
180 <sect2 role="commands">
181 <title>Command Explanations</title>
182
183 <para>
184 <option>--with-system-expat</option>: This switch enables linking against
185 system version of <application>Expat</application>, which was installed in LFS.
186 </para>
187
188 <para>
189 <option>--with-system-ffi</option>: This switch enables linking against
190 system version of <application>libffi</application>. Remove if you have
191 not installed <xref linkend="libffi"/>.
192 </para>
193
194 <para>
195 <parameter>--enable-unicode=ucs4</parameter>: This switch enables
196 32bit Unicode support in <application>Python</application>.
197 </para>
198
199 <para>
200 <parameter>--with-dbmliborder=bdb:gdbm:ndbm</parameter>: Use this switch
201 if you want to build <application>Python</application> DBM Module
202 against <application>Berkeley DB</application> instead of
203 <application>GDBM</application>.
204 </para>
205
206 <para>
207 <command>chmod ...</command>: Fix permissions for libraries to be
208 consistent with other libraries.
209 </para>
210
211 </sect2>
212
213 <sect2 role="configuration">
214 <title>Configuring Python 2</title>
215
216 <para>
217 In order for <command>python</command> to find the installed
218 documentation, you must add the following environment variable to
219 individual user's or the system's profile:
220 </para>
221
222<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python2-version;</userinput></screen>
223
224 </sect2>
225
226 <sect2 role="content">
227 <title>Contents</title>
228
229 <segmentedlist>
230 <segtitle>Installed Programs</segtitle>
231 <segtitle>Installed Library</segtitle>
232 <segtitle>Installed Directories</segtitle>
233
234 <seglistitem>
235 <seg>
236 2to3, pydoc, python (symlink), python-config (symlink),
237 python2 (symlink), python2-config (symlink),
238 python&python2-majorver;, python&python2-majorver;-config,
239 smtpd.py, and idle
240 </seg>
241 <seg>
242 libpython&python2-majorver;.so
243 </seg>
244 <seg>
245 /usr/{include,lib}/python&python2-majorver; and
246 /usr/share/doc/python-&python2-version;
247 </seg>
248 </seglistitem>
249 </segmentedlist>
250
251 <variablelist>
252 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
253 <?dbfo list-presentation="list"?>
254 <?dbhtml list-presentation="table"?>
255
256 <varlistentry id="python2-2to3">
257 <term><command>2to3</command></term>
258 <listitem>
259 <para>
260 is a <application>Python</application> program that reads
261 <application>Python 2.x</application> source code and applies a series of
262 fixers to transform it into valid <application>Python 3.x</application>
263 code.
264 </para>
265 <indexterm zone="python2 python2-2to3">
266 <primary sortas="b-2to3">2to3</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="idle">
272 <term><command>idle</command></term>
273 <listitem>
274 <para>
275 is a wrapper script that opens a <application>Python</application>
276 aware GUI editor. For this script to run, you must have installed
277 <application>Tk</application> before Python so that the Tkinter
278 Python module is built.
279 </para>
280 <indexterm zone="python2 idle">
281 <primary sortas="b-idle">idle</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="pydoc2">
287 <term><command>pydoc</command></term>
288 <listitem>
289 <para>
290 is the <application>Python</application> documentation tool.
291 </para>
292 <indexterm zone="python2 pydoc2">
293 <primary sortas="b-pydoc2">pydoc</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 <varlistentry id="python">
299 <term><command>python</command></term>
300 <listitem>
301 <para>
302 is an interpreted, interactive, object-oriented programming
303 language.
304 </para>
305 <indexterm zone="python2 python">
306 <primary sortas="b-python2">python</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="python2-ver">
312 <term><command>python&python2-majorver;</command></term>
313 <listitem>
314 <para>
315 is a version-specific name for the <command>python</command>
316 program.
317 </para>
318 <indexterm zone="python2 python2-ver">
319 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323
324 <varlistentry id="smtpd.py">
325 <term><command>smtpd.py</command></term>
326 <listitem>
327 <para>
328 is an SMTP proxy implemented in <application>Python</application>.
329 </para>
330 <indexterm zone="python2 smtpd.py">
331 <primary sortas="b-smtpd.py">smtpd.py</primary>
332 </indexterm>
333 </listitem>
334 </varlistentry>
335
336 </variablelist>
337
338 </sect2>
339
340</sect1>
Note: See TracBrowser for help on using the repository browser.