Python-3.3.2

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.4 platform.

Package Information

Additional Downloads

Optional HTML Documentation

Python 3 Dependencies

Recommended

Optional

BlueZ-4.101

Optional (For Additional Modules)

Berkeley DB-6.0.20, OpenSSL-1.0.1e, SQLite-3.8.0.2 and Tk-8.6.0

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

To test the results, issue: make test.

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.2/html &&
tar --strip-components=1 \
    --no-same-owner \
    --no-same-permissions \
    -C /usr/share/doc/python-3.3.2/html \
    -xvf ../python-3.3.2-docs-html.tar.bz2

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.2/html

Contents

Installed Programs: 2to3 (symbolic link to 2to3-3.3), 2to3-3.3, pydoc3 (symbolic link to pydoc3.3), pydoc3.3, python3 (hard link to python3.3m), python3.3 (hard link to python3.3m), python3.3m, python3-config (symbolic link to python3.3-config), python3.3-config (symbolic link to python3-config), python3.3m-config, and optionally if Tk is installed, idle3 (symbolic link to idle3.3), idle3.3
Installed Libraries: libpython3.3m.so and libpython3.so
Installed Directories: /usr/include/python3.3m, /usr/lib/python3.3, and /usr/share/doc/python-3.3.2

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.

Last updated on 2013-08-25 13:13:24 -0700