source: general/prog/python.xml@ 0fa8146

6.3 6.3-rc3
Last change on this file since 0fa8146 was 0fa8146, checked in by Randy McMurchy <randy@…>, 13 years ago

Clarified the text in the Python instructions about requiring the HTML documentation

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

  • Property mode set to 100644
File size: 8.1 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 "afb5451049eda91fbde10bd5a4b7fadc">
10 <!ENTITY python-size "9.8 MB">
11 <!ENTITY python-buildsize "180 MB">
12 <!ENTITY python-time "1.1 SBU (additional 2.7 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 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&python-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&python-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &python-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &python-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &python-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &python-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
60
61 <bridgehead renderas="sect4">Required Patch</bridgehead>
62 <itemizedlist spacing='compact'>
63 <listitem>
64 <para><ulink
65 url="&patch-root;/Python-&Python-version;-gdbm-1.patch"/></para>
66 </listitem>
67 </itemizedlist>
68
69 <bridgehead renderas="sect4">Optional HTML Documentation</bridgehead>
70 <itemizedlist spacing='compact'>
71 <listitem>
72 <para><ulink
73 url="http://docs.python.org/ftp/python/doc/&python-majorver;/html-&python-majorver;.tar.bz2"/></para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">Python Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Optional</bridgehead>
80 <para role="optional"><xref linkend="pth"/></para>
81
82 <bridgehead renderas="sect4">Optional
83 (to create package-specific support modules)</bridgehead>
84 <para role="optional"><xref linkend="openssl"/>,
85 <xref linkend="tk"/>,
86 <xref linkend="gdbm"/>, and
87 <ulink url="http://sqlite.org/">SQLite 3</ulink></para>
88 <!-- <xref linkend="db"/> -->
89
90 <para condition="html" role="usernotes">User Notes:
91 <ulink url="&blfs-wiki;/Python"/></para>
92
93 </sect2>
94
95 <sect2 role="installation">
96 <title>Installation of Python</title>
97
98 <para>Install <application>Python</application> by running the following
99 commands:</para>
100
101<screen><userinput>patch -Np1 -i ../Python-&Python-version;-gdbm-1.patch &amp;&amp;
102./configure --prefix=/usr --enable-shared &amp;&amp;
103make</userinput></screen>
104
105 <para>To test the results, issue: <command>make test</command>. Note that
106 if you have an existing <application>Python</application> installation
107 which includes the <application>PyXML</application> module, the tests could
108 produce a segmentation fault.</para>
109
110 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
111
112<screen role="root"><userinput>make install</userinput></screen>
113
114 <para>There is no documentation installed using the instructions above.
115 However, There are LaTeX sources included with the distribution. See the
116 <filename>Doc/README</filename> file in the source distribution for
117 instructions to format the LaTeX sources. Alternatively, you can download
118 preformatted documentation from
119 <ulink url="http://docs.python.org/download.html"/>.</para>
120
121 <para>In order to use the <command>help ('name_string')</command> feature
122 of the <command>python</command> interpreter with some statements and
123 keywords, you must download (or create) the optional HTML documentation
124 and install it. If you downloaded the HTML docs, issue the following
125 commands as the
126 <systemitem class="username">root</systemitem> user:</para>
127
128<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&Python-version;/html &amp;&amp;
129tar --strip-components=1 \
130 --no-same-owner \
131 --no-same-permissions \
132 -C /usr/share/doc/Python-&Python-version;/html \
133 -xvf ../html-&python-majorver;.tar.bz2</userinput></screen>
134
135 <para>In order for <command>python</command> to find the installed
136 documentation, you must add the following environment variable to
137 individual user's or the system's profile:</para>
138
139 <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&Python-version;/html</userinput></screen>
140
141 </sect2>
142
143 <sect2 role="content">
144 <title>Contents</title>
145
146 <segmentedlist>
147 <segtitle>Installed Programs</segtitle>
148 <segtitle>Installed Libraries</segtitle>
149 <segtitle>Installed Directories</segtitle>
150
151 <seglistitem>
152 <seg>pydoc, python, python&python-majorver;, smtpd.py, and optionally if
153 <application>Tk</application> is installed, idle</seg>
154 <seg>libpython&python-majorver;.so and numerous modules installed in
155 /usr/lib/python&python-majorver;/lib-dynload</seg>
156 <seg>/usr/include/python&python-majorver;,
157 /usr/lib/python&python-majorver;, and
158 /usr/share/doc/python-&Python-version;</seg>
159 </seglistitem>
160 </segmentedlist>
161
162 <variablelist>
163 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
164 <?dbfo list-presentation="list"?>
165 <?dbhtml list-presentation="table"?>
166
167 <varlistentry id="idle">
168 <term><command>idle</command></term>
169 <listitem>
170 <para>is a wrapper script that opens a
171 <application>Python</application> aware GUI editor.</para>
172 <indexterm zone="python idle">
173 <primary sortas="b-idle">idle</primary>
174 </indexterm>
175 </listitem>
176 </varlistentry>
177
178 <varlistentry id="pydoc">
179 <term><command>pydoc</command></term>
180 <listitem>
181 <para>is the <application>Python</application> documentation
182 tool.</para>
183 <indexterm zone="python pydoc">
184 <primary sortas="b-pydoc">pydoc</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="python-prog">
190 <term><command>python</command></term>
191 <listitem>
192 <para>is an interpreted, interactive, object-oriented programming
193 language.</para>
194 <indexterm zone="python python-prog">
195 <primary sortas="b-python">python</primary>
196 </indexterm>
197 </listitem>
198 </varlistentry>
199
200 <varlistentry id="python-ver">
201 <term><command>python&python-majorver;</command></term>
202 <listitem>
203 <para>is a version-specific name for the <command>python</command>
204 program.</para>
205 <indexterm zone="python python-ver">
206 <primary sortas="b-python&python-majorver;">python&python-majorver;</primary>
207 </indexterm>
208 </listitem>
209 </varlistentry>
210
211 <varlistentry id="smtpd.py">
212 <term><command>smtpd.py</command></term>
213 <listitem>
214 <para>is an SMTP proxy implemented in
215 <application>Python</application>.</para>
216 <indexterm zone="python smtpd.py">
217 <primary sortas="b-smtpd.py">smtpd.py</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
222 </variablelist>
223
224 </sect2>
225
226</sect1>
Note: See TracBrowser for help on using the repository browser.