1.  Prepare a development environment

You will first need a subversion client. A subversion client is mostly likely already available under *nix system. For windows, you may want to install tortoiseSVN.

  • Souce code: Check out simuPOP source using command,
  • SWIG: If not already installed, download and install SWIG. Swig version 1.3.36 and later is recommended. Under windows, you need to install swigwin, and add the path to the executable to an environment variable $PATH (Control Panel -> system -> advanced -> Environment Variables).
  • C++ Compiler: Get a C++ compiler. This is usually not a problem for Linux/Solaris/MacOS systems because GNU gcc/c++ is widely available on these operating systems. Under windows, you will need to can get a copy of Visual Studio 2008 Professional (needs service pack 1). The free Visual C++ Express edition from here could be used for simuPOP 1.0.5 or earlier but not 1.0.6 or later because it does not support openMP. Note that Visual Studio 2008 only works with Python 2.6 and you will have to purchase a copy of Visual Stuidio.NET 2003 for previous versions of Python.
  • Python header files: The Python header files are usually installed with Python but you should install python-devel or similar packages if this file is unavailable.
  • zlib header files (*nix systems only): zlib and its header file zlib.h are usually available under a *nix system. However, for a Ubuntu system, you will need to install the zlib1g-dev package to get this header file. Please install package build-essential if you still get missing header files.

2.  Build the git version of simuPOP

simuPOP can be compiled by python distutil module, python distribute module or scons. They have their own advantage and disadvantages:

2.1  distutils

For all versions of python, you can compile simuPOP using command

% python setup.py install

and Python will call swig to generate Python wrappers and build simuPOP. The problem with this approach is that you will have to compile all files each time when you modified the source code, which can be very slow.

3.  Using MSVC to build standalone versions of simuPOP

Before use Visual Studio 2008 to run SimuPOP, you should check the parameter and run command as follows:

  • Run ‘scons install’
  • Open the visual studio project, ‘simPOP.vcproj’.
  • Check properties in the visual studio project as follows:
    • Go to simuPOP Property Pages -> Configuration Properties: C/C++ -> General -> Addition Include directories: “.;gsl;boost_1_49_0;win32;"win32\zlib-1.2.3";C:\Python27\include”
    • Linker -> General -> Additional Library Directories: “build\std_common;C:\Python27\libs”
    • Linker -> Input -> Additional Dependencies: “python27.lib common.lib”
  • Check the version of Python and boost version. If they are not the same as your machine, change them.
  • Run the visual studio 2008 in release mode with your platform (x64 or win32)

4.  More readings

You can refer to page DevelopmentNotes for more details on how simuPOP manages its documentation and releases.