source: general/prog/python2.xml@ 7224506

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

Minor changes to Python sections

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

  • Property mode set to 100644
File size: 9.5 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 &amp;&amp;
125chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
126
127 <para>There is no documentation installed using the instructions above.
128 See the <filename>Doc/README.txt</filename> file in the source
129 distribution for instructions on how to create the html. Alternatively,
130 you can download preformatted documentation from <ulink
131 url="http://docs.python.org/download.html"/>.</para>
132
133 <para>In order to use the <command>help ('name_string')</command> feature
134 of the <command>python</command> interpreter with some statements and
135 keywords, you must download (or create) the optional HTML documentation
136 and install it. If you downloaded the HTML docs, issue the following
137 commands as the
138 <systemitem class="username">root</systemitem> user:</para>
139
140<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&python2-version;/html &amp;&amp;
141tar --strip-components=1 \
142 --no-same-owner \
143 --no-same-permissions \
144 -C /usr/share/doc/Python-&python2-version;/html \
145 -xvf ../python-&python2-majorver;-docs-html.tar.bz2</userinput></screen>
146
147 </sect2>
148
149 <sect2 role="commands">
150 <title>Command Explanations</title>
151
152 <para><command>sed -i "s/ndbm_libs = ..." setup.py</command>: This command
153 is used to fix a build problem with the <application>GDBM</application>
154 library.</para>
155
156 <para><command>chmod ...</command>: Fix permissions for libraries to be
157 consistent with other libraries.</para>
158
159 </sect2>
160
161 <sect2 role="configuration">
162 <title>Configuring Python 2</title>
163
164 <para>In order for <command>python</command> to find the installed
165 documentation, you must add the following environment variable to
166 individual user's or the system's profile:</para>
167
168 <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&python2-version;/html</userinput></screen>
169
170 </sect2>
171
172 <sect2 role="content">
173 <title>Contents</title>
174
175 <segmentedlist>
176 <segtitle>Installed Programs</segtitle>
177 <segtitle>Installed Libraries</segtitle>
178 <segtitle>Installed Directories</segtitle>
179
180 <seglistitem>
181 <seg>pydoc, python, python-config, python&python2-majorver;,
182 python&python2-majorver;-config, smtpd.py, and optionally if
183 <application>Tk</application> is installed, idle</seg>
184 <seg>libpython&python2-majorver;.so and numerous modules installed in
185 /usr/lib/python&python2-majorver;/lib-dynload</seg>
186 <seg>/usr/include/python&python2-majorver;,
187 /usr/lib/python&python2-majorver;, and
188 /usr/share/doc/python-&python2-version;</seg>
189 </seglistitem>
190 </segmentedlist>
191
192 <variablelist>
193 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
194 <?dbfo list-presentation="list"?>
195 <?dbhtml list-presentation="table"?>
196
197 <varlistentry id="idle2">
198 <term><command>idle</command></term>
199 <listitem>
200 <para>is a wrapper script that opens a
201 <application>Python</application> aware GUI editor.</para>
202 <indexterm zone="python idle2">
203 <primary sortas="b-idle2">idle</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="pydoc2">
209 <term><command>pydoc</command></term>
210 <listitem>
211 <para>is the <application>Python</application> documentation
212 tool.</para>
213 <indexterm zone="python pydoc2">
214 <primary sortas="b-pydoc2">pydoc</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="python2-prog">
220 <term><command>python</command></term>
221 <listitem>
222 <para>is an interpreted, interactive, object-oriented programming
223 language.</para>
224 <indexterm zone="python python2-prog">
225 <primary sortas="b-python">python</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="python2-ver">
231 <term><command>python&python2-majorver;</command></term>
232 <listitem>
233 <para>is a version-specific name for the <command>python</command>
234 program.</para>
235 <indexterm zone="python python2-ver">
236 <primary sortas="b-python&python2-majorver;">python&python2-majorver;</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="smtpd.py2">
242 <term><command>smtpd.py</command></term>
243 <listitem>
244 <para>is an SMTP proxy implemented in
245 <application>Python</application>.</para>
246 <indexterm zone="python smtpd.py2">
247 <primary sortas="b-smtpd.py2">smtpd.py</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 </variablelist>
253
254 </sect2>
255
256</sect1>
Note: See TracBrowser for help on using the repository browser.