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 &&
|
---|
102 | ./configure --prefix=/usr --enable-shared &&
|
---|
103 | make</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 ('module_name')</command> feature
|
---|
122 | of the <command>python</command> interpreter, you must download (or create)
|
---|
123 | the optional HTML documentation and install it. If you downloaded the HTML
|
---|
124 | docs, issue the following commands as the
|
---|
125 | <systemitem class="username">root</systemitem> user:</para>
|
---|
126 |
|
---|
127 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&Python-version;/html &&
|
---|
128 | tar --strip-components=1 \
|
---|
129 | --no-same-owner \
|
---|
130 | --no-same-permissions \
|
---|
131 | -C /usr/share/doc/Python-&Python-version;/html \
|
---|
132 | -xvf ../html-&python-majorver;.tar.bz2</userinput></screen>
|
---|
133 |
|
---|
134 | <para>In order for <command>python</command> to find the installed
|
---|
135 | documentation, you must add the following environment variable to
|
---|
136 | individual user's or the system's profile:</para>
|
---|
137 |
|
---|
138 | <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&Python-version;/html</userinput></screen>
|
---|
139 |
|
---|
140 | </sect2>
|
---|
141 |
|
---|
142 | <sect2 role="content">
|
---|
143 | <title>Contents</title>
|
---|
144 |
|
---|
145 | <segmentedlist>
|
---|
146 | <segtitle>Installed Programs</segtitle>
|
---|
147 | <segtitle>Installed Libraries</segtitle>
|
---|
148 | <segtitle>Installed Directories</segtitle>
|
---|
149 |
|
---|
150 | <seglistitem>
|
---|
151 | <seg>pydoc, python, python&python-majorver;, smtpd.py, and optionally if
|
---|
152 | <application>Tk</application> is installed, idle</seg>
|
---|
153 | <seg>libpython&python-majorver;.so and numerous modules installed in
|
---|
154 | /usr/lib/python&python-majorver;/lib-dynload</seg>
|
---|
155 | <seg>/usr/include/python&python-majorver;,
|
---|
156 | /usr/lib/python&python-majorver;, and
|
---|
157 | /usr/share/doc/python-&Python-version;</seg>
|
---|
158 | </seglistitem>
|
---|
159 | </segmentedlist>
|
---|
160 |
|
---|
161 | <variablelist>
|
---|
162 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
163 | <?dbfo list-presentation="list"?>
|
---|
164 | <?dbhtml list-presentation="table"?>
|
---|
165 |
|
---|
166 | <varlistentry id="idle">
|
---|
167 | <term><command>idle</command></term>
|
---|
168 | <listitem>
|
---|
169 | <para>is a wrapper script that opens a
|
---|
170 | <application>Python</application> aware GUI editor.</para>
|
---|
171 | <indexterm zone="python idle">
|
---|
172 | <primary sortas="b-idle">idle</primary>
|
---|
173 | </indexterm>
|
---|
174 | </listitem>
|
---|
175 | </varlistentry>
|
---|
176 |
|
---|
177 | <varlistentry id="pydoc">
|
---|
178 | <term><command>pydoc</command></term>
|
---|
179 | <listitem>
|
---|
180 | <para>is the <application>Python</application> documentation
|
---|
181 | tool.</para>
|
---|
182 | <indexterm zone="python pydoc">
|
---|
183 | <primary sortas="b-pydoc">pydoc</primary>
|
---|
184 | </indexterm>
|
---|
185 | </listitem>
|
---|
186 | </varlistentry>
|
---|
187 |
|
---|
188 | <varlistentry id="python-prog">
|
---|
189 | <term><command>python</command></term>
|
---|
190 | <listitem>
|
---|
191 | <para>is an interpreted, interactive, object-oriented programming
|
---|
192 | language.</para>
|
---|
193 | <indexterm zone="python python-prog">
|
---|
194 | <primary sortas="b-python">python</primary>
|
---|
195 | </indexterm>
|
---|
196 | </listitem>
|
---|
197 | </varlistentry>
|
---|
198 |
|
---|
199 | <varlistentry id="python-ver">
|
---|
200 | <term><command>python&python-majorver;</command></term>
|
---|
201 | <listitem>
|
---|
202 | <para>is a version-specific name for the <command>python</command>
|
---|
203 | program.</para>
|
---|
204 | <indexterm zone="python python-ver">
|
---|
205 | <primary sortas="b-python&python-majorver;">python&python-majorver;</primary>
|
---|
206 | </indexterm>
|
---|
207 | </listitem>
|
---|
208 | </varlistentry>
|
---|
209 |
|
---|
210 | <varlistentry id="smtpd.py">
|
---|
211 | <term><command>smtpd.py</command></term>
|
---|
212 | <listitem>
|
---|
213 | <para>is an SMTP proxy implemented in
|
---|
214 | <application>Python</application>.</para>
|
---|
215 | <indexterm zone="python smtpd.py">
|
---|
216 | <primary sortas="b-smtpd.py">smtpd.py</primary>
|
---|
217 | </indexterm>
|
---|
218 | </listitem>
|
---|
219 | </varlistentry>
|
---|
220 |
|
---|
221 | </variablelist>
|
---|
222 |
|
---|
223 | </sect2>
|
---|
224 |
|
---|
225 | </sect1>
|
---|