[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">
|
---|
[f4031b6c] | 9 | <!ENTITY python-md5sum "e81c2f0953aa60f8062c05a4673f2be0">
|
---|
| 10 | <!ENTITY python-size "10.5 MB">
|
---|
| 11 | <!ENTITY python-buildsize "186 MB (additional 13M to run the test suite)">
|
---|
| 12 | <!ENTITY python-time "1.2 SBU (additional 2.6 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 |
|
---|
[f4031b6c] | 69 | <bridgehead renderas="sect4">Optional Patch</bridgehead>
|
---|
| 70 | <itemizedlist spacing='compact'>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para><ulink
|
---|
| 73 | url="&patch-root;/Python-&Python-version;-testing-1.patch"/></para>
|
---|
| 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
| 76 |
|
---|
[1970f00] | 77 | <bridgehead renderas="sect4">Optional HTML Documentation</bridgehead>
|
---|
| 78 | <itemizedlist spacing='compact'>
|
---|
| 79 | <listitem>
|
---|
| 80 | <para><ulink
|
---|
[b3997ba] | 81 | url="http://docs.python.org/ftp/python/doc/&python-majorver;/python-&python-majorver;-docs-html.tar.bz2"/></para>
|
---|
[1970f00] | 82 | </listitem>
|
---|
| 83 | </itemizedlist>
|
---|
| 84 |
|
---|
[83f69e5d] | 85 | <bridgehead renderas="sect3">Python Dependencies</bridgehead>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[1970f00] | 88 | <para role="optional"><xref linkend="pth"/></para>
|
---|
| 89 |
|
---|
| 90 | <bridgehead renderas="sect4">Optional
|
---|
| 91 | (to create package-specific support modules)</bridgehead>
|
---|
[256ee72c] | 92 | <para role="optional"><xref linkend="openssl"/>,
|
---|
[1970f00] | 93 | <xref linkend="tk"/>,
|
---|
| 94 | <xref linkend="gdbm"/>, and
|
---|
| 95 | <ulink url="http://sqlite.org/">SQLite 3</ulink></para>
|
---|
[2a038b2] | 96 | <!-- <xref linkend="db"/> -->
|
---|
[83f69e5d] | 97 |
|
---|
[1039de3] | 98 | <para condition="html" role="usernotes">User Notes:
|
---|
[6c42d4e] | 99 | <ulink url="&blfs-wiki;/Python"/></para>
|
---|
[1039de3] | 100 |
|
---|
[83f69e5d] | 101 | </sect2>
|
---|
| 102 |
|
---|
| 103 | <sect2 role="installation">
|
---|
| 104 | <title>Installation of Python</title>
|
---|
| 105 |
|
---|
| 106 | <para>Install <application>Python</application> by running the following
|
---|
| 107 | commands:</para>
|
---|
| 108 |
|
---|
| 109 | <screen><userinput>patch -Np1 -i ../Python-&Python-version;-gdbm-1.patch &&
|
---|
[f4031b6c] | 110 | patch -Np1 -i ../Python-&Python-version;-testing-1.patch &&
|
---|
[52d29f7] | 111 | ./configure --prefix=/usr --enable-shared &&
|
---|
[83f69e5d] | 112 | make</userinput></screen>
|
---|
| 113 |
|
---|
[1970f00] | 114 | <para>To test the results, issue: <command>make test</command>. Note that
|
---|
| 115 | if you have an existing <application>Python</application> installation
|
---|
| 116 | which includes the <application>PyXML</application> module, the tests could
|
---|
| 117 | produce a segmentation fault.</para>
|
---|
[83f69e5d] | 118 |
|
---|
| 119 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 120 |
|
---|
| 121 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 122 |
|
---|
[1970f00] | 123 | <para>There is no documentation installed using the instructions above.
|
---|
[f4031b6c] | 124 | See the <filename>Doc/README.txt</filename> file in the source
|
---|
| 125 | distribution for instructions on how to create the html. Alternatively,
|
---|
| 126 | you can download preformatted documentation from <ulink
|
---|
| 127 | url="http://docs.python.org/download.html"/>.</para>
|
---|
[1970f00] | 128 |
|
---|
[8cebf004] | 129 | <para>In order to use the <command>help ('name_string')</command> feature
|
---|
| 130 | of the <command>python</command> interpreter with some statements and
|
---|
| 131 | keywords, you must download (or create) the optional HTML documentation
|
---|
| 132 | and install it. If you downloaded the HTML docs, issue the following
|
---|
| 133 | commands as the
|
---|
[1970f00] | 134 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 135 |
|
---|
| 136 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&Python-version;/html &&
|
---|
| 137 | tar --strip-components=1 \
|
---|
[cff8f9e] | 138 | --no-same-owner \
|
---|
| 139 | --no-same-permissions \
|
---|
[1970f00] | 140 | -C /usr/share/doc/Python-&Python-version;/html \
|
---|
[fe2cf26] | 141 | -xvf ../html-&python-majorver;.tar.bz2</userinput></screen>
|
---|
[1970f00] | 142 |
|
---|
| 143 | <para>In order for <command>python</command> to find the installed
|
---|
| 144 | documentation, you must add the following environment variable to
|
---|
| 145 | individual user's or the system's profile:</para>
|
---|
| 146 |
|
---|
| 147 | <screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&Python-version;/html</userinput></screen>
|
---|
[83f69e5d] | 148 |
|
---|
| 149 | </sect2>
|
---|
| 150 |
|
---|
| 151 | <sect2 role="content">
|
---|
| 152 | <title>Contents</title>
|
---|
| 153 |
|
---|
| 154 | <segmentedlist>
|
---|
| 155 | <segtitle>Installed Programs</segtitle>
|
---|
| 156 | <segtitle>Installed Libraries</segtitle>
|
---|
| 157 | <segtitle>Installed Directories</segtitle>
|
---|
| 158 |
|
---|
| 159 | <seglistitem>
|
---|
[1970f00] | 160 | <seg>pydoc, python, python&python-majorver;, smtpd.py, and optionally if
|
---|
[83f69e5d] | 161 | <application>Tk</application> is installed, idle</seg>
|
---|
[1970f00] | 162 | <seg>libpython&python-majorver;.so and numerous modules installed in
|
---|
| 163 | /usr/lib/python&python-majorver;/lib-dynload</seg>
|
---|
| 164 | <seg>/usr/include/python&python-majorver;,
|
---|
| 165 | /usr/lib/python&python-majorver;, and
|
---|
[fe2cf26] | 166 | /usr/share/doc/python-&Python-version;</seg>
|
---|
[83f69e5d] | 167 | </seglistitem>
|
---|
| 168 | </segmentedlist>
|
---|
| 169 |
|
---|
| 170 | <variablelist>
|
---|
| 171 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 172 | <?dbfo list-presentation="list"?>
|
---|
| 173 | <?dbhtml list-presentation="table"?>
|
---|
| 174 |
|
---|
| 175 | <varlistentry id="idle">
|
---|
| 176 | <term><command>idle</command></term>
|
---|
| 177 | <listitem>
|
---|
[7cd76d62] | 178 | <para>is a wrapper script that opens a
|
---|
[83f69e5d] | 179 | <application>Python</application> aware GUI editor.</para>
|
---|
| 180 | <indexterm zone="python idle">
|
---|
| 181 | <primary sortas="b-idle">idle</primary>
|
---|
| 182 | </indexterm>
|
---|
| 183 | </listitem>
|
---|
| 184 | </varlistentry>
|
---|
| 185 |
|
---|
| 186 | <varlistentry id="pydoc">
|
---|
| 187 | <term><command>pydoc</command></term>
|
---|
| 188 | <listitem>
|
---|
[7cd76d62] | 189 | <para>is the <application>Python</application> documentation
|
---|
[83f69e5d] | 190 | tool.</para>
|
---|
| 191 | <indexterm zone="python pydoc">
|
---|
| 192 | <primary sortas="b-pydoc">pydoc</primary>
|
---|
| 193 | </indexterm>
|
---|
| 194 | </listitem>
|
---|
| 195 | </varlistentry>
|
---|
| 196 |
|
---|
| 197 | <varlistentry id="python-prog">
|
---|
| 198 | <term><command>python</command></term>
|
---|
| 199 | <listitem>
|
---|
[7cd76d62] | 200 | <para>is an interpreted, interactive, object-oriented programming
|
---|
[83f69e5d] | 201 | language.</para>
|
---|
| 202 | <indexterm zone="python python-prog">
|
---|
| 203 | <primary sortas="b-python">python</primary>
|
---|
| 204 | </indexterm>
|
---|
| 205 | </listitem>
|
---|
| 206 | </varlistentry>
|
---|
| 207 |
|
---|
[f67f5387] | 208 | <varlistentry id="python-ver">
|
---|
[1970f00] | 209 | <term><command>python&python-majorver;</command></term>
|
---|
[83f69e5d] | 210 | <listitem>
|
---|
[0619e6d] | 211 | <para>is a version-specific name for the <command>python</command>
|
---|
[83f69e5d] | 212 | program.</para>
|
---|
[f67f5387] | 213 | <indexterm zone="python python-ver">
|
---|
[1970f00] | 214 | <primary sortas="b-python&python-majorver;">python&python-majorver;</primary>
|
---|
[83f69e5d] | 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
| 219 | <varlistentry id="smtpd.py">
|
---|
| 220 | <term><command>smtpd.py</command></term>
|
---|
| 221 | <listitem>
|
---|
[7cd76d62] | 222 | <para>is an SMTP proxy implemented in
|
---|
[83f69e5d] | 223 | <application>Python</application>.</para>
|
---|
| 224 | <indexterm zone="python smtpd.py">
|
---|
| 225 | <primary sortas="b-smtpd.py">smtpd.py</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 | </listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
| 230 | </variablelist>
|
---|
| 231 |
|
---|
| 232 | </sect2>
|
---|
[f45b1953] | 233 |
|
---|
| 234 | </sect1>
|
---|