2004-06-13 06:56:28 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-06-13 06:56:28 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2012-02-11 22:55:35 +08:00
|
|
|
<!ENTITY python3-download-http
|
2012-07-20 00:27:40 +08:00
|
|
|
"http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
|
|
|
|
<!ENTITY python3-download-ftp " ">
|
2013-05-18 04:11:12 +08:00
|
|
|
<!ENTITY python3-md5sum "c94b78ea3b68a9bbc9906af4d5b4fdc7">
|
2013-04-07 18:08:27 +08:00
|
|
|
<!ENTITY python3-size "12 MB">
|
2013-05-18 04:11:12 +08:00
|
|
|
<!ENTITY python3-buildsize "260 MB">
|
|
|
|
<!ENTITY python3-time "0.9 SBU">
|
2013-01-18 23:06:25 +08:00
|
|
|
|
2012-02-11 22:55:35 +08:00
|
|
|
<!ENTITY python3htmldoc-download-http
|
2012-07-20 00:27:40 +08:00
|
|
|
"http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
|
2013-05-18 04:11:12 +08:00
|
|
|
<!ENTITY python3htmldoc-md5sum "b5eee2b290338fb08c1512bfc79bb999">
|
|
|
|
<!ENTITY python3htmldoc-size "4.7 MB">
|
2004-06-13 06:56:28 +08:00
|
|
|
]>
|
|
|
|
|
2011-11-01 03:38:44 +08:00
|
|
|
<sect1 id="python3" xreflabel="Python-&python3-version;">
|
|
|
|
<?dbhtml filename="python3.html" ?>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
2011-11-01 03:38:44 +08:00
|
|
|
<title>Python-&python3-version;</title>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
2011-11-01 03:38:44 +08:00
|
|
|
<indexterm zone="python3">
|
2013-04-07 18:08:27 +08:00
|
|
|
<primary sortas="a-Python3">Python3</primary>
|
2005-05-06 04:01:37 +08:00
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
2013-04-07 18:08:27 +08:00
|
|
|
<title>Introduction to Python 3</title>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-04-07 18:08:27 +08:00
|
|
|
The <application>Python 3</application> package contains the
|
2012-07-20 00:27:40 +08:00
|
|
|
<application>Python</application> development environment.
|
|
|
|
This is useful for object-oriented programming, writing scripts,
|
|
|
|
prototyping large programs or developing entire applications.
|
|
|
|
</para>
|
2009-07-28 17:43:23 +08:00
|
|
|
|
2013-08-26 04:13:24 +08:00
|
|
|
&lfs74_checked;
|
2009-07-28 17:43:23 +08:00
|
|
|
|
2005-05-06 04:01:37 +08:00
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&python3-download-http;"/>
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&python3-download-ftp;"/>
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &python3-md5sum;
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download size: &python3-size;
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &python3-buildsize;
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &python3-time;
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
2012-07-20 00:27:40 +08:00
|
|
|
<itemizedlist spacing="compact">
|
2009-08-01 14:29:35 +08:00
|
|
|
<title>Optional HTML Documentation</title>
|
2008-03-18 02:11:35 +08:00
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
|
|
|
|
</para>
|
2009-08-01 14:29:35 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &python3htmldoc-md5sum;
|
|
|
|
</para>
|
2009-08-01 14:29:35 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
Download size: &python3htmldoc-size;
|
|
|
|
</para>
|
2008-03-18 02:11:35 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2013-04-07 18:08:27 +08:00
|
|
|
<bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2013-10-22 04:02:06 +08:00
|
|
|
<xref linkend="expat"/> and
|
|
|
|
<xref linkend="libffi"/>
|
2012-07-20 00:27:40 +08:00
|
|
|
</para>
|
|
|
|
|
2005-05-06 04:01:37 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para role="optional">
|
|
|
|
<xref linkend="bluez"/>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect4">Optional (For Additional Modules)</bridgehead>
|
|
|
|
<para role="optional">
|
2013-01-18 23:06:25 +08:00
|
|
|
<xref linkend="db"/>,
|
2012-07-20 00:27:40 +08:00
|
|
|
<xref linkend="openssl"/>,
|
|
|
|
<xref linkend="sqlite"/> and
|
|
|
|
<xref linkend="tk"/>
|
|
|
|
</para>
|
2010-03-10 22:18:08 +08:00
|
|
|
|
2006-04-11 02:35:56 +08:00
|
|
|
<para condition="html" role="usernotes">User Notes:
|
2012-07-20 00:27:40 +08:00
|
|
|
<ulink url="&blfs-wiki;/Python3"/>
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
2013-04-07 18:08:27 +08:00
|
|
|
<title>Installation of Python 3</title>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-04-07 18:08:27 +08:00
|
|
|
Install <application>Python 3</application> by running the following
|
2012-07-20 00:27:40 +08:00
|
|
|
commands:
|
|
|
|
</para>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
2013-05-18 04:11:12 +08:00
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
2012-10-18 03:08:35 +08:00
|
|
|
--enable-shared \
|
2012-07-20 00:27:40 +08:00
|
|
|
--with-system-expat \
|
|
|
|
--with-system-ffi &&
|
2005-05-06 04:01:37 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-04-07 18:08:27 +08:00
|
|
|
To test the results, issue: <command>make test</command>.
|
2012-07-20 00:27:40 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
|
|
|
|
2013-01-18 23:06:25 +08:00
|
|
|
<screen role="root"><userinput>make install &&
|
2012-10-18 03:08:35 +08:00
|
|
|
chmod -v 755 /usr/lib/libpython&python3-majorver;m.so &&
|
2012-07-20 00:27:40 +08:00
|
|
|
chmod -v 755 /usr/lib/libpython3.so</userinput></screen>
|
|
|
|
|
|
|
|
<para>
|
2013-04-07 18:08:27 +08:00
|
|
|
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:
|
2012-07-20 00:27:40 +08:00
|
|
|
</para>
|
2008-03-18 02:11:35 +08:00
|
|
|
|
2013-05-18 04:11:12 +08:00
|
|
|
<screen role="root"><userinput>install -v -dm755 /usr/share/doc/python-&python3-version;/html &&
|
2008-03-18 02:11:35 +08:00
|
|
|
tar --strip-components=1 \
|
2008-03-25 10:32:52 +08:00
|
|
|
--no-same-owner \
|
|
|
|
--no-same-permissions \
|
2013-04-07 18:08:27 +08:00
|
|
|
-C /usr/share/doc/python-&python3-version;/html \
|
2012-01-09 01:42:27 +08:00
|
|
|
-xvf ../python-&python3-version;-docs-html.tar.bz2</userinput></screen>
|
2008-03-18 02:11:35 +08:00
|
|
|
|
2009-02-18 07:10:06 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-01-18 23:06:25 +08:00
|
|
|
<option>--with-system-expat</option>: This switch enables linking against
|
2012-07-20 00:27:40 +08:00
|
|
|
system version of <application>Expat</application>. Remove if you have
|
|
|
|
not installed recommended dependency <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 recommended dependency <xref linkend="libffi"/>.
|
|
|
|
</para>
|
|
|
|
|
2013-01-18 23:06:25 +08:00
|
|
|
<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>
|
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-02-12 02:51:17 +08:00
|
|
|
<command>chmod ...</command>: Fix permissions for shared libraries to be
|
2012-07-20 00:27:40 +08:00
|
|
|
consistent with other libraries.
|
|
|
|
</para>
|
2011-11-02 01:39:25 +08:00
|
|
|
|
2009-02-18 07:10:06 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="configuration">
|
2013-04-07 18:08:27 +08:00
|
|
|
<title>Configuring Python 3</title>
|
2009-02-18 07:10:06 +08:00
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
2013-04-07 18:08:27 +08:00
|
|
|
In order for <command>python3</command> to find the installed
|
2012-07-20 00:27:40 +08:00
|
|
|
documentation, you must add the following environment variable to
|
|
|
|
individual user's or the system's profile:
|
|
|
|
</para>
|
2008-03-18 02:11:35 +08:00
|
|
|
|
2013-04-07 18:08:27 +08:00
|
|
|
<screen role="root"><userinput>export PYTHONDOCS=/usr/share/doc/python-&python3-version;/html</userinput></screen>
|
2005-05-06 04:01:37 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Programs</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<seg>
|
|
|
|
2to3 (symbolic link to 2to3-&python3-majorver;),
|
|
|
|
2to3-&python3-majorver;,
|
|
|
|
|
|
|
|
pydoc3 (symbolic link to pydoc&python3-majorver;),
|
|
|
|
pydoc&python3-majorver;,
|
|
|
|
|
2013-02-12 02:51:17 +08:00
|
|
|
python3 (hard link to python&python3-majorver;m),
|
|
|
|
python&python3-majorver; (hard link to python&python3-majorver;m),
|
|
|
|
python&python3-majorver;m,
|
2012-07-20 00:27:40 +08:00
|
|
|
|
|
|
|
python3-config (symbolic link to python&python3-majorver;-config),
|
|
|
|
python&python3-majorver;-config (symbolic link to python3-config),
|
2012-10-18 03:08:35 +08:00
|
|
|
python&python3-majorver;m-config,
|
2012-07-20 00:27:40 +08:00
|
|
|
|
|
|
|
and optionally if Tk is installed,
|
|
|
|
idle3 (symbolic link to idle&python3-majorver;),
|
|
|
|
idle&python3-majorver;
|
|
|
|
</seg>
|
|
|
|
<seg>
|
2013-04-07 18:08:27 +08:00
|
|
|
libpython&python3-majorver;m.so and libpython3.so
|
2012-07-20 00:27:40 +08:00
|
|
|
</seg>
|
|
|
|
<seg>
|
2012-10-18 03:08:35 +08:00
|
|
|
/usr/include/python&python3-majorver;m,
|
2012-07-20 00:27:40 +08:00
|
|
|
/usr/lib/python&python3-majorver;, and
|
|
|
|
/usr/share/doc/python-&python3-version;
|
|
|
|
</seg>
|
2005-05-06 04:01:37 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<varlistentry id="idle3">
|
|
|
|
<term><command>idle3</command></term>
|
2005-05-06 04:01:37 +08:00
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
is a wrapper script that opens a
|
|
|
|
<application>Python</application> aware GUI editor.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="python3 idle3">
|
|
|
|
<primary sortas="b-idle3">idle3</primary>
|
2005-05-06 04:01:37 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-07-20 00:27:40 +08:00
|
|
|
<varlistentry id="pydoc3">
|
|
|
|
<term><command>pydoc3</command></term>
|
2005-05-06 04:01:37 +08:00
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
is the <application>Python</application> documentation
|
|
|
|
tool.
|
|
|
|
</para>
|
|
|
|
<indexterm zone="python3 pydoc3">
|
|
|
|
<primary sortas="b-pydoc3">pydo3c</primary>
|
2005-05-06 04:01:37 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2011-11-01 03:38:44 +08:00
|
|
|
<varlistentry id="python3-prog">
|
2012-02-11 22:55:35 +08:00
|
|
|
<term><command>python3</command></term>
|
2005-05-06 04:01:37 +08:00
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
is an interpreted, interactive, object-oriented programming
|
|
|
|
language.
|
|
|
|
</para>
|
2011-11-01 03:38:44 +08:00
|
|
|
<indexterm zone="python3 python3-prog">
|
|
|
|
<primary sortas="b-python3">python3</primary>
|
2005-05-06 04:01:37 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2007-08-08 23:18:24 +08:00
|
|
|
<varlistentry id="python-ver">
|
2011-11-01 03:38:44 +08:00
|
|
|
<term><command>python&python3-majorver;</command></term>
|
2005-05-06 04:01:37 +08:00
|
|
|
<listitem>
|
2012-07-20 00:27:40 +08:00
|
|
|
<para>
|
|
|
|
is a version-specific name for the <command>python</command>
|
|
|
|
program.
|
|
|
|
</para>
|
2011-11-01 03:38:44 +08:00
|
|
|
<indexterm zone="python3 python-ver">
|
2012-02-11 22:55:35 +08:00
|
|
|
<primary
|
|
|
|
sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
|
2005-05-06 04:01:37 +08:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2002-07-08 04:28:42 +08:00
|
|
|
|
|
|
|
</sect1>
|