Python-3.3.4

Introduction to Python 3

The Python 3 package contains the Python development environment. This is useful for object-oriented programming, writing scripts, prototyping large programs or developing entire applications.

This package is known to build and work properly using an LFS-7.5 platform.

Package Information

  • Download (HTTP): http://www.python.org/ftp/python/3.3.4/Python-3.3.4.tar.xz

  • Download MD5 sum: 8fb961a20600aafafd249537af3ac637

  • Download size: 12 MB

  • Estimated disk space required: 260 MB (225 MB without docs or 144 MB for the tests)

  • Estimated build time: 1.0 SBU (or 2.5 SBU for the tests)

Additional Downloads

Optional HTML Documentation

Python 3 Dependencies

Recommended

Optional

BlueZ-4.101, GDB-7.7 (required for some tests), and Valgrind

Optional (For Additional Modules)

Berkeley DB-6.0.20, OpenSSL-1.0.1f, SQLite-3.8.3.1 and Tk-8.6.1

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/Python3

Installation of Python 3

Install Python 3 by running the following commands:

./configure --prefix=/usr       \
            --enable-shared     \
            --with-system-expat \
            --with-system-ffi &&
make

The test suite must be run separately, using an X terminal (see below).

Now, as the root user:

make install &&
chmod -v 755 /usr/lib/libpython3.3m.so &&
chmod -v 755 /usr/lib/libpython3.so

If you have downloaded the preformatted documentation from http://docs.python.org/download.html, install it as the root user:

install -v -dm755 /usr/share/doc/python-3.3.4/html &&
tar --strip-components=1 \
    --no-same-owner \
    --no-same-permissions \
    -C /usr/share/doc/python-3.3.4/html \
    -xvf ../python-3.3.4-docs-html.tar.bz2

The test suite must be run separately from the build, either before or after the package is built and installed. Do not run make install, after running the test suite. To build and install the package, you need to start with a fresh or clean source tree. For the test, you also need a clean source code, so either start by removing the source code directory and starting over, by uncompressing the source tarball or by running make clean. Then configure again, adding “--with-pydebug” to the configure switches above, run make, then make test. Remember that some tests fail, if not run in an X terminal.

Command Explanations

--with-system-expat: This switch enables linking against system version of Expat. Remove if you have not installed recommended dependency expat-2.1.0.

--with-system-ffi: This switch enables linking against system version of libffi. Remove if you have not installed recommended dependency libffi-3.0.13.

--with-dbmliborder=bdb:gdbm:ndbm: Use this switch if you want to build Python DBM Module against Berkeley DB instead of GDBM.

chmod ...: Fix permissions for shared libraries to be consistent with other libraries.

Configuring Python 3

In order for python3 to find the installed documentation, you must add the following environment variable to individual user's or the system's profile:

export PYTHONDOCS=/usr/share/doc/python-3.3.4/html

Contents

Installed Programs: 2to3 (symlink), 2to3-3.3, pydoc3 (symlink), pydoc3.3, python3 (symlink); python3.3 and python3.3m (hardlinked); python3-config (symlink), python3.3-config (symlink), python3.3m-config, pyvenv (symlink), pyvenv3.3, and optionally, if Tk is installed, idle3 (symlink) and idle3.3
Installed Libraries: libpython3.3m.so and libpython3.so; several under /usr/lib/python3.3/lib-dynload/
Installed Directories: /usr/include/python3.3m, /usr/lib/python3.3, and /usr/share/doc/python-3.3.4

Short Descriptions

idle3

is a wrapper script that opens a Python aware GUI editor.

pydoc3

is the Python documentation tool.

python3

is an interpreted, interactive, object-oriented programming language.

python3.3

is a version-specific name for the python program.

pyvenv

creates virtual Python environments in one or more target directories.

Last updated on 2014-02-20 13:02:22 -0800