Compiling From Source
In order to compile the bindings from source, you have to download the COPASI sources for Build-30 from the COPASI server
as well as the patch for the bindings on the same server. To apply the patch, you unpack the sources and change into the top level directory of the sources. Under any UNIX system you use the program patch to apply the patch. The command line for that could look like this:
bunzip2 -c PATCHFILE | patch -p1
Once the patch has been applied, you have to tell the build system where to find the needed libraries and include files. In order to compile the sources you will need an implementation of LAPACK
1.3.31 (other version will most likely not work), a Java
SDK and/or a python
installation with header files.
Since the build system relies on qmake, a version of Qt 4
(or at least qmake) is needed as well. The build system probably also requires you to have qwt
On MacOS X, an implementation of LAPACK is already included in the form of the Accelerate framework, on windows and Linux the Intel Math Kernel Libraries
can be used as well as one of the implementations mentioned above.
Configuration under windows is slightly different from the UNIX systems. Under windows configure.bat is the script that is used to configure the sources. With configure.bat most options are passed as variables rather then command line arguments. A call to configure.bat might for example look like this:
configure.bat --enable-release \
This would configure the build of a release version of the python and the java bindings (as well as CopasiSE) with expat and libsbml dynamically linked.
On some systems tweaking of copasi/common.pri
in the source directory might be necessary to get COPASI to compile.
One last word of caution. The bindings are automatically created using the SWIG package. Although the bindings an be created using the latest SWIG 2, the code generated by SWIG 2 seemed to contain some bugs and not all features worked. So in my opinion, SWIG 1.3.40 currently provides the better results.