glfs/general/prog/python.xml

235 lines
8.4 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY python-download-http "http://www.python.org/ftp/python/&Python-version;/Python-&Python-version;.tar.bz2">
<!ENTITY python-download-ftp "&gentoo-ftp-repo;/Python-&Python-version;.tar.bz2">
<!ENTITY python-md5sum "e81c2f0953aa60f8062c05a4673f2be0">
<!ENTITY python-size "10.5 MB">
<!ENTITY python-buildsize "186 MB (additional 13M to run the test suite)">
<!ENTITY python-time "1.2 SBU (additional 2.6 SBU to run the test suite)">
]>
<sect1 id="python" xreflabel="Python-&Python-version;">
<?dbhtml filename="python.html" ?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Python-&Python-version;</title>
<indexterm zone="python">
<primary sortas="a-Python">Python</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Python</title>
<para>The <application>Python</application> package contains the
<application>Python</application> development environment.
This is useful for object-oriented programming, writing scripts,
prototyping large programs or developing entire applications.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&python-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&python-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &python-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &python-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &python-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &python-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<bridgehead renderas="sect4">Required Patch</bridgehead>
<itemizedlist spacing='compact'>
<listitem>
<para><ulink
url="&patch-root;/Python-&Python-version;-gdbm-1.patch"/></para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect4">Optional Patch</bridgehead>
<itemizedlist spacing='compact'>
<listitem>
<para><ulink
url="&patch-root;/Python-&Python-version;-testing-1.patch"/></para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect4">Optional HTML Documentation</bridgehead>
<itemizedlist spacing='compact'>
<listitem>
<para><ulink
url="http://docs.python.org/ftp/python/doc/&python-majorver;/python-&python-majorver;-docs-html.tar.bz2"/></para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Python Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional"><xref linkend="pth"/></para>
<bridgehead renderas="sect4">Optional
(to create package-specific support modules)</bridgehead>
<para role="optional"><xref linkend="openssl"/>,
<xref linkend="tk"/>,
<xref linkend="gdbm"/>, and
<ulink url="http://sqlite.org/">SQLite 3</ulink></para>
<!-- <xref linkend="db"/> -->
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/Python"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of Python</title>
<para>Install <application>Python</application> by running the following
commands:</para>
<screen><userinput>patch -Np1 -i ../Python-&Python-version;-gdbm-1.patch &amp;&amp;
patch -Np1 -i ../Python-&Python-version;-testing-1.patch &amp;&amp;
./configure --prefix=/usr --enable-shared &amp;&amp;
make</userinput></screen>
<para>To test the results, issue: <command>make test</command>. Note that
if you have an existing <application>Python</application> installation
which includes the <application>PyXML</application> module, the tests could
produce a segmentation fault.</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install</userinput></screen>
<para>There is no documentation installed using the instructions above.
See the <filename>Doc/README.txt</filename> file in the source
distribution for instructions on how to create the html. Alternatively,
you can download preformatted documentation from <ulink
url="http://docs.python.org/download.html"/>.</para>
<para>In order to use the <command>help ('name_string')</command> feature
of the <command>python</command> interpreter with some statements and
keywords, you must download (or create) the optional HTML documentation
and install it. If you downloaded the HTML docs, issue the following
commands as the
<systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/Python-&Python-version;/html &amp;&amp;
tar --strip-components=1 \
--no-same-owner \
--no-same-permissions \
-C /usr/share/doc/Python-&Python-version;/html \
-xvf ../python-&python-majorver;-docs-html.tar.bz2</userinput></screen>
<para>In order for <command>python</command> to find the installed
documentation, you must add the following environment variable to
individual user's or the system's profile:</para>
<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/Python-&Python-version;/html</userinput></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>pydoc, python, python&python-majorver;, smtpd.py, and optionally if
<application>Tk</application> is installed, idle</seg>
<seg>libpython&python-majorver;.so and numerous modules installed in
/usr/lib/python&python-majorver;/lib-dynload</seg>
<seg>/usr/include/python&python-majorver;,
/usr/lib/python&python-majorver;, and
/usr/share/doc/python-&Python-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="idle">
<term><command>idle</command></term>
<listitem>
<para>is a wrapper script that opens a
<application>Python</application> aware GUI editor.</para>
<indexterm zone="python idle">
<primary sortas="b-idle">idle</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pydoc">
<term><command>pydoc</command></term>
<listitem>
<para>is the <application>Python</application> documentation
tool.</para>
<indexterm zone="python pydoc">
<primary sortas="b-pydoc">pydoc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="python-prog">
<term><command>python</command></term>
<listitem>
<para>is an interpreted, interactive, object-oriented programming
language.</para>
<indexterm zone="python python-prog">
<primary sortas="b-python">python</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="python-ver">
<term><command>python&python-majorver;</command></term>
<listitem>
<para>is a version-specific name for the <command>python</command>
program.</para>
<indexterm zone="python python-ver">
<primary sortas="b-python&python-majorver;">python&python-majorver;</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="smtpd.py">
<term><command>smtpd.py</command></term>
<listitem>
<para>is an SMTP proxy implemented in
<application>Python</application>.</para>
<indexterm zone="python smtpd.py">
<primary sortas="b-smtpd.py">smtpd.py</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>