You can get the latest release of the SIP source code from http://www.riverbankcomputing.com/software/sip/download.
SIP is also included with all of the major Linux distributions. However, it may be a version or two out of date.
After unpacking the source package (either a .tar.gz or a .zip file depending on your platform) you should then check for any README files that relate to your platform.
Next you need to configure SIP by executing the configure.py script. For example:
python configure.py
This assumes that the Python interpreter is on your path. Something like the following may be appropriate on Windows:
c:\python26\python configure.py
If you have multiple versions of Python installed then make sure you use the interpreter for which you wish SIP to generate bindings for.
The full set of command line options is:
The configure.py script takes many other options that allows the build system to be finely tuned. These are of the form name=value or name+=value. The --show-build-macros option will display each supported name, although not all are applicable to all platforms.
The name=value form means that value will replace the existing value of name.
The name+=value form means that value will be appended to the existing value of name.
For example, the following will disable support for C++ exceptions (and so reduce the size of module binaries) when used with GCC:
python configure.py CXXFLAGS+=-fno-exceptions
A pure Python module called sipconfig.py is generated by configure.py. This defines each name and its corresponding value. Looking at it will give you a good idea of how the build system uses the different options. It is covered in detail in The Build System.
SIP, and the modules it generates, can be built with MinGW, the Windows port of GCC. You must use the --platform command line option to specify the correct platform. For example:
c:\python26\python configure.py --platform win32-g++
The next step is to build SIP by running your platform’s make command. For example:
make
The final step is to install SIP by running the following command:
make install
(Depending on your system you may require root or administrator privileges.)
This will install the various SIP components.