source: general/prog/python2.xml@ b88be39

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 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 b88be39 was b88be39, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Update to cmake-2.8.6.
Update to curl-7.22.0.
Updated to libarchive-2.8.5.
Reset all python references to python2.

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

  • Property mode set to 100644
File size: 9.3 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 "http://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
8 <!ENTITY python2-download-ftp "&gentoo-ftp-repo;/Python-&python2-version;.tar.xz">
9 <!ENTITY python2-md5sum "75c87a80c6ddb0b785a57ea3583e04fa">
10 <!ENTITY python2-size "9.5 MB">
11 <!ENTITY python2-buildsize "235 MB (not including the test suite)">
12 <!ENTITY python2-time "1 SBU (not including the test suite)">
13 <!ENTITY python2htmldoc-download-http "http://docs.python.org/ftp/python/doc/&python2-majorver;/python-&python2-majorver;-docs-html.tar.bz2">
14 <!ENTITY python2htmldoc-md5sum "40f0bd51b221662cae14fb0c6b6f622b">
15 <!ENTITY python2htmldoc-size "4.1 MB">
16]>
17
18<sect1 id="python" xreflabel="Python-&python2-version;">
19 <?dbhtml filename="python2.html" ?>
20
21 <sect1info>
22 <othername>$LastChangedBy: bdubbs $</othername>
23 <date>$Date: 2011-10-28 13:57:13 -0500 (Fri, 28 Oct 2011) $</date>
24 </sect1info>
25
26 <title>Python-&python2-version;</title>
27
28 <indexterm zone="python">
29 <primary sortas="a-Python2">Python</primary>
30 </indexterm>
31
32 <sect2 role="package">
33 <title>Introduction to Python 2</title>
34
35 <para>The <application>Python 2</application> package contains the
36 <application>Python</application> development environment.
37 This is useful for object-oriented programming, writing scripts,
38 prototyping large programs or developing entire applications. This version
39 is for backward compatibility with other dependent packages.</para>
40
41 <!-- Python compiled against Pth, OpenSSL, and SQLite.
42 326 tests OK, 36 tests skipped, 0 failures -->
43
44 &lfs70_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>Download (HTTP): <ulink url="&python2-download-http;"/></para>
50 </listitem>
51 <listitem>
52 <para>Download (FTP): <ulink url="&python2-download-ftp;"/></para>
53 </listitem>
54 <listitem>
55 <para>Download MD5 sum: &python2-md5sum;</para>
56 </listitem>
57 <listitem>
58 <para>Download size: &python2-size;</para>
59 </listitem>
60 <listitem>
61 <para>Estimated disk space required: &python2-buildsize;</para>
62 </listitem>
63 <listitem>
64 <para>Estimated build time: &python2-time;</para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
69
70 <itemizedlist spacing='compact'>
71 <title>Optional HTML Documentation</title>
72 <listitem>
73 <para>Download (HTTP): <ulink url="&python2htmldoc-download-http;"/></para>
74 </listitem>
75 <listitem>
76 <para>Download MD5 sum: &python2htmldoc-md5sum;</para>
77 </listitem>
78 <listitem>
79 <para>Download size: &python2htmldoc-size;</para>
80 </listitem>
81 </itemizedlist>
82
83 <bridgehead renderas="sect3">Python Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Optional</bridgehead>
86 <para role="optional"><xref linkend="pth"/>,
87 <xref linkend="libffi"/> or <xref linkend="gcc"/> (install JAVA so that the
88 <filename class="libraryfile">libffi</filename> library is built), and
89 <ulink url="http://www.bluez.org/">BlueZ</ulink></para>
90
91 <bridgehead renderas="sect4">Optional
92 (to create package-specific support modules)</bridgehead>
93 <para role="optional"><xref linkend="openssl"/>,
94 <xref linkend="tk"/>,
95 <xref linkend="db"/>, and
96 <xref linkend="sqlite"/></para>
97
98 <para>Note that there is a circular dependency with the
99 <application>Tk</application> package as it requires Xorg to be installed
100 but parts of Xorg depend on <application>Python</application>.</para>
101
102 <para condition="html" role="usernotes">User Notes:
103 <ulink url="&blfs-wiki;/Python"/></para>
104
105 </sect2>
106
107 <sect2 role="installation">
108 <title>Installation of Python</title>
109
110 <para>Install <application>Python</application> by running the following
111 commands:</para>
112
113<screen><userinput>sed -i "s/ndbm_libs = \[\]/ndbm_libs = ['gdbm', 'gdbm_compat']/" setup.py &amp;&amp;
114./configure --prefix=/usr --enable-shared &amp;&amp;
115make</userinput></screen>
116
117 <para>To test the results, issue: <command>make test</command>. Note that
118 if you have an existing <application>Python 2</application> installation
119 which includes the <application>PyXML</application> module, the tests could
120 produce a segmentation fault.</para>
121
122 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
123
124<screen role="root"><userinput>make install</userinput></screen>
125
126 <para>There is no documentation installed using the instructions above.
127 See the <filename>Doc/README.txt</filename> file in the source
128 distribution for instructions on how to create the html. Alternatively,
129 you can download preformatted documentation from <ulink
130 url="http://docs.python.org/download.html"/>.</para>
131
132 <para>In order to use the <command>help ('name_string')</command> feature
133 of the <command>python</command> interpreter with some statements and
134 keywords, you must download (or create) the optional HTML documentation
135 and install it. If you downloaded the HTML docs, issue the following
136 commands as the
137 <systemitem class="username">root</systemitem> user:</para>
138
139<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python2-version;/html &amp;&amp;
140tar --strip-components=1 \
141 --no-same-owner \
142 --no-same-permissions \
143 -C /usr/share/doc/Python-&python2-version;/html \
144 -xvf ../python-&python2-majorver;-docs-html.tar.bz2</userinput></screen>
145
146 </sect2>
147
148 <sect2 role="commands">
149 <title>Command Explanations</title>
150
151 <para><command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
152 is used to fix a build problem with the <application>GDBM</application>
153 library.</para>
154
155 </sect2>
156
157 <sect2 role="configuration">
158 <title>Configuring Python 2</title>
159
160 <para>In order for <command>python</command> to find the installed
161 documentation, you must add the following environment variable to
162 individual user's or the system's profile:</para>
163
164 <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python2-version;/html</userinput></screen>
165
166 </sect2>
167
168 <sect2 role="content">
169 <title>Contents</title>
170
171 <segmentedlist>
172 <segtitle>Installed Programs</segtitle>
173 <segtitle>Installed Libraries</segtitle>
174 <segtitle>Installed Directories</segtitle>
175
176 <seglistitem>
177 <seg>pydoc, python, python-config, python&python2-majorver;,
178 python&python2-majorver;-config, smtpd.py, and optionally if
179 <application>Tk</application> is installed, idle</seg>
180 <seg>libpython&python2-majorver;.so and numerous modules installed in
181 /usr/lib/python&python2-majorver;/lib-dynload</seg>
182 <seg>/usr/include/python&python2-majorver;,
183 /usr/lib/python&python2-majorver;, and
184 /usr/share/doc/python-&python2-version;</seg>
185 </seglistitem>
186 </segmentedlist>
187
188 <variablelist>
189 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
190 <?dbfo list-presentation="list"?>
191 <?dbhtml list-presentation="table"?>
192
193 <varlistentry id="idle2">
194 <term><command>idle</command></term>
195 <listitem>
196 <para>is a wrapper script that opens a
197 <application>Python</application> aware GUI editor.</para>
198 <indexterm zone="python idle2">
199 <primary sortas="b-idle2">idle</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="pydoc2">
205 <term><command>pydoc</command></term>
206 <listitem>
207 <para>is the <application>Python</application> documentation
208 tool.</para>
209 <indexterm zone="python pydoc2">
210 <primary sortas="b-pydoc2">pydoc</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry id="python2-prog">
216 <term><command>python</command></term>
217 <listitem>
218 <para>is an interpreted, interactive, object-oriented programming
219 language.</para>
220 <indexterm zone="python python2-prog">
221 <primary sortas="b-python">python</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="python2-ver">
227 <term><command>python&python2-majorver;</command></term>
228 <listitem>
229 <para>is a version-specific name for the <command>python</command>
230 program.</para>
231 <indexterm zone="python python2-ver">
232 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="smtpd.py2">
238 <term><command>smtpd.py</command></term>
239 <listitem>
240 <para>is an SMTP proxy implemented in
241 <application>Python</application>.</para>
242 <indexterm zone="python smtpd.py2">
243 <primary sortas="b-smtpd.py2">smtpd.py</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 </variablelist>
249
250 </sect2>
251
252</sect1>
Note: See TracBrowser for help on using the repository browser.