[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[83f69e5d] | 7 | <!ENTITY python-download-http "http://www.python.org/ftp/python/&Python-version;/Python-&Python-version;.tar.bz2">
|
---|
[fb2e525] | 8 | <!ENTITY python-download-ftp "&gentoo-ftp-repo;/Python-&Python-version;.tar.bz2">
|
---|
[1970f00] | 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)">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[3fe8b511] | 15 | <sect1 id="python" xreflabel="Python-&Python-version;">
|
---|
[256ee72c] | 16 | <?dbhtml filename="python.html" ?>
|
---|
[83f69e5d] | 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>
|
---|
[1970f00] | 60 |
|
---|
| 61 | <bridgehead renderas="sect4">Required Patch</bridgehead>
|
---|
[83f69e5d] | 62 | <itemizedlist spacing='compact'>
|
---|
| 63 | <listitem>
|
---|
[1970f00] | 64 | <para><ulink
|
---|
[83f69e5d] | 65 | url="&patch-root;/Python-&Python-version;-gdbm-1.patch"/></para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
[1970f00] | 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 |
|
---|
[83f69e5d] | 77 | <bridgehead renderas="sect3">Python Dependencies</bridgehead>
|
---|
| 78 |
|
---|
| 79 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[1970f00] | 80 | <para role="optional"><xref linkend="pth"/></para>
|
---|
| 81 |
|
---|
| 82 | <bridgehead renderas="sect4">Optional
|
---|
| 83 | (to create package-specific support modules)</bridgehead>
|
---|
[256ee72c] | 84 | <para role="optional"><xref linkend="openssl"/>,
|
---|
[1970f00] | 85 | <xref linkend="tk"/>,
|
---|
| 86 | <xref linkend="gdbm"/>, and
|
---|
| 87 | <ulink url="http://sqlite.org/">SQLite 3</ulink></para>
|
---|
[2a038b2] | 88 | <!-- <xref linkend="db"/> -->
|
---|
[83f69e5d] | 89 |
|
---|
[1039de3] | 90 | <para condition="html" role="usernotes">User Notes:
|
---|
[6c42d4e] | 91 | <ulink url="&blfs-wiki;/Python"/></para>
|
---|
[1039de3] | 92 |
|
---|
[83f69e5d] | 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 &&
|
---|
[52d29f7] | 102 | ./configure --prefix=/usr --enable-shared &&
|
---|
[83f69e5d] | 103 | make</userinput></screen>
|
---|
| 104 |
|
---|
[1970f00] | 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>
|
---|
[83f69e5d] | 109 |
|
---|
| 110 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 111 |
|
---|
| 112 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 113 |
|
---|
[1970f00] | 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 |
|
---|
[8cebf004] | 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
|
---|
[1970f00] | 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 &&
|
---|
| 129 | tar --strip-components=1 \
|
---|
[cff8f9e] | 130 | --no-same-owner \
|
---|
| 131 | --no-same-permissions \
|
---|
[1970f00] | 132 | -C /usr/share/doc/Python-&Python-version;/html \
|
---|
[fe2cf26] | 133 | -xvf ../html-&python-majorver;.tar.bz2</userinput></screen>
|
---|
[1970f00] | 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>
|
---|
[83f69e5d] | 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>
|
---|
[1970f00] | 152 | <seg>pydoc, python, python&python-majorver;, smtpd.py, and optionally if
|
---|
[83f69e5d] | 153 | <application>Tk</application> is installed, idle</seg>
|
---|
[1970f00] | 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
|
---|
[fe2cf26] | 158 | /usr/share/doc/python-&Python-version;</seg>
|
---|
[83f69e5d] | 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>
|
---|
[7cd76d62] | 170 | <para>is a wrapper script that opens a
|
---|
[83f69e5d] | 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>
|
---|
[7cd76d62] | 181 | <para>is the <application>Python</application> documentation
|
---|
[83f69e5d] | 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>
|
---|
[7cd76d62] | 192 | <para>is an interpreted, interactive, object-oriented programming
|
---|
[83f69e5d] | 193 | language.</para>
|
---|
| 194 | <indexterm zone="python python-prog">
|
---|
| 195 | <primary sortas="b-python">python</primary>
|
---|
| 196 | </indexterm>
|
---|
| 197 | </listitem>
|
---|
| 198 | </varlistentry>
|
---|
| 199 |
|
---|
[f67f5387] | 200 | <varlistentry id="python-ver">
|
---|
[1970f00] | 201 | <term><command>python&python-majorver;</command></term>
|
---|
[83f69e5d] | 202 | <listitem>
|
---|
[0619e6d] | 203 | <para>is a version-specific name for the <command>python</command>
|
---|
[83f69e5d] | 204 | program.</para>
|
---|
[f67f5387] | 205 | <indexterm zone="python python-ver">
|
---|
[1970f00] | 206 | <primary sortas="b-python&python-majorver;">python&python-majorver;</primary>
|
---|
[83f69e5d] | 207 | </indexterm>
|
---|
| 208 | </listitem>
|
---|
| 209 | </varlistentry>
|
---|
| 210 |
|
---|
| 211 | <varlistentry id="smtpd.py">
|
---|
| 212 | <term><command>smtpd.py</command></term>
|
---|
| 213 | <listitem>
|
---|
[7cd76d62] | 214 | <para>is an SMTP proxy implemented in
|
---|
[83f69e5d] | 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>
|
---|
[f45b1953] | 225 |
|
---|
| 226 | </sect1>
|
---|