source: general/prog/python.xml@ 714e540f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 714e540f was 48b816cb, checked in by Guy Dalziel <gdalziel@…>, 15 years ago

Updated to Python-2.6.2.

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

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