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.
Download (HTTP): http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.xz
Download MD5 sum: c94b78ea3b68a9bbc9906af4d5b4fdc7
Download size: 12 MB
Estimated disk space required: 260 MB
Estimated build time: 0.9 SBU
Optional HTML Documentation
Download (HTTP): http://docs.python.org/ftp/python/doc/3.3.2/python-3.3.2-docs-html.tar.bz2
Download MD5 sum: b5eee2b290338fb08c1512bfc79bb999
Download size: 4.7 MB
expat-2.1.0, libffi-3.0.13 and pkg-config-0.28
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
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
--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.
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
Last updated on 2013-08-25 13:13:24 -0700