mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-27 18:02:12 +08:00
21e8edc6de
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12257 af4574ff-66df-0310-9fd7-8a98e5e911e0
332 lines
10 KiB
XML
332 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 python3-download-http
|
|
"http://www.python.org/ftp/python/&python3-version;/Python-&python3-version;.tar.xz">
|
|
<!ENTITY python3-download-ftp " ">
|
|
<!ENTITY python3-md5sum "4ca001c5586eb0744e3174bc75c6fba8">
|
|
<!ENTITY python3-size "12 MB">
|
|
<!ENTITY python3-buildsize "224 MB (additional 35 MB for the docs and
|
|
35 MB for the tests)">
|
|
<!ENTITY python3-time "1.1 SBU (additional 1.4 SBU for the tests)">
|
|
|
|
<!ENTITY python3htmldoc-download-http
|
|
"http://docs.python.org/ftp/python/doc/&python3-version;/python-&python3-version;-docs-html.tar.bz2">
|
|
<!ENTITY python3htmldoc-md5sum "ed20d57923a9f76f62f6122aa12be08f">
|
|
<!ENTITY python3htmldoc-size "4.8 MB">
|
|
]>
|
|
|
|
<sect1 id="python3" xreflabel="Python-&python3-version;">
|
|
<?dbhtml filename="python3.html" ?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>Python-&python3-version;</title>
|
|
|
|
<indexterm zone="python3">
|
|
<primary sortas="a-Python3">Python3</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to Python 3</title>
|
|
|
|
<para>
|
|
The <application>Python 3</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>
|
|
|
|
&lfs74_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&python3-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&python3-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &python3-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &python3-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &python3-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &python3-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<title>Optional HTML Documentation</title>
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&python3htmldoc-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &python3htmldoc-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &python3htmldoc-size;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">Python 3 Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="expat"/> and
|
|
<xref linkend="libffi"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="bluez"/> and
|
|
<ulink url="http://www.valgrind.org/">Valgrind</ulink>
|
|
</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;/Python3"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Python 3</title>
|
|
|
|
<para>
|
|
Install <application>Python 3</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
--enable-shared \
|
|
--with-system-expat \
|
|
--with-system-ffi &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue: <command>make -k test</command>. One test
|
|
(test_gdb) has been reported to fail.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
chmod -v 755 /usr/lib/libpython&python3-majorver;m.so &&
|
|
chmod -v 755 /usr/lib/libpython3.so</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-&python3-version;/html &&
|
|
tar --strip-components=1 \
|
|
--no-same-owner \
|
|
--no-same-permissions \
|
|
-C /usr/share/doc/python-&python3-version;/html \
|
|
-xvf ../python-&python3-version;-docs-html.tar.bz2</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 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>
|
|
|
|
<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 shared libraries to be
|
|
consistent with other libraries.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring Python 3</title>
|
|
|
|
<para>
|
|
In order for <command>python3</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-&python3-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>
|
|
2to3 (symbolic link to 2to3-&python3-majorver;),
|
|
2to3-&python3-majorver;,
|
|
|
|
pydoc3 (symbolic link to pydoc&python3-majorver;),
|
|
pydoc&python3-majorver;,
|
|
|
|
python3 (symbolic link to python&python3-majorver;),
|
|
python&python3-majorver; (hard link to python&python3-majorver;m),
|
|
python&python3-majorver;m,
|
|
|
|
python3-config (symbolic link to python&python3-majorver;-config),
|
|
python&python3-majorver;-config (symbolic link to python3m-config),
|
|
python&python3-majorver;m-config,
|
|
|
|
pyvenv (symbolic link to pyvenv&python3-majorver;),
|
|
pyvenv&python3-majorver;,
|
|
|
|
and optionally, if Tk is installed,
|
|
idle3 (symbolic link to idle&python3-majorver;) and
|
|
idle&python3-majorver;
|
|
</seg>
|
|
<seg>
|
|
libpython&python3-majorver;m.so and libpython3.so
|
|
</seg>
|
|
<seg>
|
|
/usr/include/python&python3-majorver;m,
|
|
/usr/lib/python&python3-majorver;, and
|
|
/usr/share/doc/python-&python3-version;
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="idle3">
|
|
<term><command>idle3</command></term>
|
|
<listitem>
|
|
<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>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="pydoc3">
|
|
<term><command>pydoc3</command></term>
|
|
<listitem>
|
|
<para>
|
|
is the <application>Python</application> documentation
|
|
tool.
|
|
</para>
|
|
<indexterm zone="python3 pydoc3">
|
|
<primary sortas="b-pydoc3">pydo3c</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="python3-prog">
|
|
<term><command>python3</command></term>
|
|
<listitem>
|
|
<para>
|
|
is an interpreted, interactive, object-oriented programming
|
|
language.
|
|
</para>
|
|
<indexterm zone="python3 python3-prog">
|
|
<primary sortas="b-python3">python3</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="python-ver">
|
|
<term><command>python&python3-majorver;</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a version-specific name for the <command>python</command>
|
|
program.
|
|
</para>
|
|
<indexterm zone="python3 python-ver">
|
|
<primary
|
|
sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="pyvenv">
|
|
<term><command>pyvenv</command></term>
|
|
<listitem>
|
|
<para>
|
|
creates virtual <application>Python</application> environments in
|
|
one or more target directories.
|
|
</para>
|
|
<indexterm zone="python3 pyvenv">
|
|
<primary
|
|
sortas="b-python&python3-majorver;">python&python3-majorver;</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|