phraSED-ML  1.0.1
Compiling and Installing phraSED-ML

Windows Binaries

The Windows Python installer

The Windows python bindings come as a .zip file that can be used to install the bindings on your machine. Either use setup.py to install them in the python system folder, or edit PYTHONPATH to point to the unzipped 'phrasedml' directory. You can use setup.py to install the phrasedml bindings with the command:

python.exe setup.py install

Compiling From Source

To compile phrasedml from source, use CMake (http://cmake.org/). For most systems, 'cmake-gui' is your best bet, but if you are trying to compile remotely via a terminal program, 'ccmake' will also work, and has a similar interface. phraSED-ML, libSBML, libSEDML, and libNUML all now use CMake as their core build system, so once you learn the basics for one, your knowledge should transfer to the others.

To start, create a new subdirectory in the 'phrasedml/' directory, and cd into it:

mkdir build; cd build

Next, run 'cmake-gui' (or 'ccmake', if you are trying to build remotely and need a text-based interface) with '..' (the parent directory) as the argument:

cmake-gui ..

The first thing to set is what you want to compile to. On Linux and MacOSX, 'Native Makefiles' is probably your best bet. For Windows, you can set the compiler to whatever version of Visual Studio you have installed, or to Cygwin if you have that.

You will need to tell CMake where certain other libraries are:

  • libSEDML. If LIBSEDML_INSTALL_DIR is set, CMake will automatically find LIBSEDML_LIBRARY and LIBSEDML_INCLUDE_DIR. If WITH_STATIC_SEDML is set, it will automatically search for the static version of the library, and then ask you about the locations of libSEDML's dependencies (libNUML).
  • libNUML. If LIBNUML_INSTALL_DIR is set, CMake will automatically find LIBNUML_LIBRARY and LIBNUML_INCLUDE_DIR. If WITH_STATIC_NUML is set, it will automatically search for the static version of the library.
  • libSBML. If LIBSBML_INSTALL_DIR is set, CMake will automatically find LIBSBML_LIBRARY and LIBSBML_INCLUDE_DIR. If WITH_STATIC_SBML is set, it will automatically search for the static version of the library, and then ask you about the locations of libsbml's dependencies (the XML library you used, and any compression libraries included). This information can be set with the WITH_LIBSBML_EXPAT, WITH_LIBSBML_LIBXML, or WITH_LIBSBML_XERXES options, and the WITH_LIBSBML_COMPRESSION option. Set one of the first three to 'true', depending on how your libsbml has been compiled, and set the last to 'true' if the two compression libraries are included in your libsbml or not.

The following options can also be set:

  • WITH_CHECK Use libcheck to perform unit testing on phrasedml.
  • WITH_EXAMPLES Compiles programs contained in the 'examples/' directory. At the moment, this is only a single program, 'phrasedml-convert', a command-line phrasedml/SED-ML converter.
  • WITH_PYTHON Build the python bindings. Requires SWIG, meaning the SWIG_EXECUTABLE will need to be set. If this is turned on, the options PYTHON_LOCAL_INSTALL and PYTHON_SYSTEM_INSTALL will also be enabled: the first causes the bindings to be installed into [install_dir]/bindings/python/, while the second uses the Python set in PYTHON_EXECUTABLE along with 'setup.py' to install the bindings to the system directory.
  • WITH_STATIC_RUNTIME Sets whether to compile using the static MSVC runtime.
  • CMAKE_BUILD_TYPE Used to set whether to make a release or debug version by default, settable to 'Debug', 'Release', 'RelWithDebInfo', or 'MinSizeRel'. (The last has not been tested extensively with this project, but is a standard CMake option.)
  • CMAKE_INSTALL_PREFIX Used to set where to install the phrasedml library and executables. I often use '../install/' for a local install.

If CMake does not work for you, you may be able to get things working on your own–phrasedml is not a complicated program, with only a handful of .cpp files in a single directory, which you may be able to get working yourself. The core phraSED-ML parser (phrasedml.ypp) is compiled with bison to phrasedml_tab.cpp, which is already included. The main complications are its various dependencies: you will need libsedml, libnuml, and libsbml, plus any of those libraries' dependencies.