mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
31d2934e8c
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11649 af4574ff-66df-0310-9fd7-8a98e5e911e0
329 lines
10 KiB
XML
329 lines
10 KiB
XML
<?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 python2-download-http
|
|
"http://www.python.org/ftp/python/&python2-version;/Python-&python2-version;.tar.xz">
|
|
<!ENTITY python2-download-ftp " ">
|
|
<!ENTITY python2-md5sum "5eea8462f69ab1369d32f9c4cd6272ab">
|
|
<!ENTITY python2-size "9.8 MB">
|
|
<!ENTITY python2-buildsize "235 MB">
|
|
<!ENTITY python2-time "1.0 SBU">
|
|
|
|
<!ENTITY python2htmldoc-download-http
|
|
"http://docs.python.org/ftp/python/doc/&python2-version;/python-&python2-version;-docs-html.tar.bz2">
|
|
<!ENTITY python2htmldoc-md5sum "77ae8fd6b456c6339a1a62d57425335b">
|
|
<!ENTITY python2htmldoc-size "4.3 MB">
|
|
]>
|
|
|
|
<sect1 id="python2" xreflabel="Python-&python2-version;">
|
|
<?dbhtml filename="python2.html" ?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>Python-&python2-version;</title>
|
|
|
|
<indexterm zone="python2">
|
|
<primary sortas="a-Python2">Python2</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Python 2</title>
|
|
|
|
<para>
|
|
The <application>Python 2</application> package contains the
|
|
<application>Python</application> development environment. It is useful
|
|
for object-oriented programming, writing scripts, prototyping large
|
|
programs or developing entire applications. This version is for backward
|
|
compatibility with other dependent packages.
|
|
</para>
|
|
|
|
&lfs74_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&python2-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&python2-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &python2-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &python2-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &python2-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &python2-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
<title>Optional HTML Documentation</title>
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&python2htmldoc-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &python2htmldoc-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &python2htmldoc-size;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Python 2 Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="expat"/>,
|
|
<xref linkend="libffi"/> and
|
|
<xref linkend="pkgconfig"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="bluez"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="db"/>,
|
|
<xref linkend="openssl"/>,
|
|
<xref linkend="sqlite"/> and
|
|
<xref linkend="tk"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">
|
|
User Notes: <ulink url="&blfs-wiki;/Python"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Python 2</title>
|
|
|
|
<para>
|
|
Install <application>Python 2</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
--enable-shared \
|
|
--with-system-expat \
|
|
--with-system-ffi \
|
|
--enable-unicode=ucs4 &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue: <command>make test</command>.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
chmod -v 755 /usr/lib/libpython&python2-majorver;.so.1.0</userinput></screen>
|
|
|
|
<para>
|
|
If you have downloaded the preformatted documentation from
|
|
<ulink url="http://docs.python.org/download.html"/>, install it
|
|
as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python2-version; &&
|
|
tar --strip-components=1 -C /usr/share/doc/python-&python2-version; \
|
|
-xvf ../python-&python2-version;-docs-html.tar.bz2 &&
|
|
find /usr/share/doc/python-&python2-version; -type d -exec chmod 0755 {} \; &&
|
|
find /usr/share/doc/python-&python2-version; -type f -exec chmod 0644 {} \;</userinput></screen>
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<option>--with-system-expat</option>: This switch enables linking against
|
|
system version of <application>Expat</application>. Remove if you have
|
|
not installed <xref linkend="expat"/>.
|
|
</para>
|
|
|
|
<para>
|
|
<option>--with-system-ffi</option>: This switch enables linking against
|
|
system version of <application>libffi</application>. Remove if you have
|
|
not installed <xref linkend="libffi"/>.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--enable-unicode=ucs4</parameter>: This switch enables
|
|
32bit Unicode support in <application>Python</application>.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--with-dbmliborder=bdb:gdbm:ndbm</parameter>: Use this switch
|
|
if you want to build <application>Python</application> DBM Module
|
|
against <application>Berkeley DB</application> instead of
|
|
<application>GDBM</application>.
|
|
</para>
|
|
|
|
<para>
|
|
<command>chmod ...</command>: Fix permissions for libraries to be
|
|
consistent with other libraries.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring Python 2</title>
|
|
|
|
<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-&python2-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Library</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
2to3, pydoc, python, python-config, python2, python2-config,
|
|
python&python2-majorver;, python&python2-majorver;-config,
|
|
smtpd.py, and optionally if <application>Tk</application>
|
|
is installed, idle
|
|
</seg>
|
|
<seg>
|
|
libpython&python2-majorver;.so
|
|
</seg>
|
|
<seg>
|
|
/usr/include/python&python2-majorver;,
|
|
/usr/lib/python&python2-majorver;, and
|
|
/usr/share/doc/python-&python2-version;</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="python2-2to3">
|
|
<term><command>2to3</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a <application>Python</application> program that reads
|
|
<application>Python 2.x</application> source code and applies a series of
|
|
fixers to transform it into valid <application>Python 3.x</application>
|
|
code.
|
|
</para>
|
|
<indexterm zone="python2 python2-2to3">
|
|
<primary sortas="b-2to3">2to3</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<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="python2 idle">
|
|
<primary sortas="b-idle">idle</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="pydoc2">
|
|
<term><command>pydoc</command></term>
|
|
<listitem>
|
|
<para>
|
|
is the <application>Python</application> documentation tool.
|
|
</para>
|
|
<indexterm zone="python2 pydoc2">
|
|
<primary sortas="b-pydoc2">pydoc</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="python">
|
|
<term><command>python</command></term>
|
|
<listitem>
|
|
<para>
|
|
is an interpreted, interactive, object-oriented programming
|
|
language.
|
|
</para>
|
|
<indexterm zone="python2 python">
|
|
<primary sortas="b-python2">python</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="python2-ver">
|
|
<term><command>python&python2-majorver;</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a version-specific name for the <command>python</command>
|
|
program.
|
|
</para>
|
|
<indexterm zone="python2 python2-ver">
|
|
<primary sortas="b-python&python2-majorver;">python&python2-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="python2 smtpd.py">
|
|
<primary sortas="b-smtpd.py">smtpd.py</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|