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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7e16699b was 56605b9, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Remove XML::Parser from perl modules
Archive acl, attr, intltool, expat, gperf
Synchronize libcap with LFS.

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

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