Contents

System Requirements

System Requirements for building on Windows

Cygwin

Cygwin: http://www.cygwin.com/

Cygwin is used to provide a unix-like environment in which to run 'configure' and 'make'.

Besides the default set of packages, make sure to install:

MinGW

MinGW: http://www.mingw.org/

The MinGW compiler toolchain is used to generate win32 executables. In particular, these packages:

And for building PyLucene:

System Requirements for building on Linux

The usual stuff; the package should behave just like the source package from python.org.





Build using the Makefiles Package

The Makefiles package provides a convenient mechanism for downloading and building some of the external libraries required by some modules included with Python. In particular, the makefiles package will download and build:

Modules that are not supported include:

Additional modules that can be easily downloaded and compiled using the makefiles module include:

Getting the Makefiles

Go to: http://sourceforge.net/project/showfiles.php?group_id=182839 and download the latest makefiles package.

Then, unpack the makefiles:

# Create a top-level directory for our project;
mkdir python-mingw             
cd python-mingw
tar xvzf makefiles-XXX.tar.gz
mv makefiles-XXX makefiles

# cd into the makefiles directory where we will do the rest or our work;
cd makefiles

Install the Compilers

If you do not already have the mingw compiler suite installed, you can get it via:

make mingw-download
make mingw-unpack

Do the Build

Then:

make python25

Run the Tests

To verify which modules are working and installed:

make python25-test

Reorganize the Layout

The makefiles used to build Python-MinGW create a layout that is much as it would be for any other unix platform. To reorganize the layout so it more closely resembles the windows release from python.org, do the following:

make python25-win32-release

Build Additional Modules

You can download and build additional modules for installation into the python build tree. To see a list of available modules and install them, do:

make modulelist
<displays a list of available modules and their versions>

# Now, download and build a module
make <module-name>

# To build most modules; 
make most

# To build all modules:
make all  # most + pil, pylucene, & wxpython;

Additional Make Targets





Build Python-mingw without using the Makefiles Package

Building from the Python-MinGW package will create a python installation with none of the modules that require external libraries. To include the zlib, bzip2, and sqlite modules, you should follow the instructions above entitled Build using the Makefiles Package.

Download Python

Download the python source code from http://www.python.org/download/ .

Download the Patches

Download the patches that match your python version from HERE .

Unpack Python and Apply the Patches

Unpack the tree using and apply the patches:

tar xvzf python-XXX.tgz (adjust this line if you downloaded the .bz2 file)
cd python-XXX
gunzip < ../patches-XXX.gz | patch -b -p0

Building the Source

Make sure the MinGW compilers are at the start of your path. Then:

# cd into the top-level python directory;
cd python-XXX
# Pick your own value for prefix;
./configure --prefix=/cygdrive/c/python-mingw --host=i686-pc-mingw32
make
make install

Installation (last edited 2007-12-08 05:07:45 by dpb)