Skip to content
Janne H. Korhonen edited this page Apr 26, 2016 · 5 revisions

Building MOODS from git

For building MOODS-python directly from the git repository, you will have to link core/ under python (the philosophy is that core/ and other common components are shared by all (hypothetical) scripting language interfaces, so we don't keep it under python/):

cd python/
ln -s ../core/
# For `python setup.py sdist` to work as expected, also do:
cd scripts/
ln -s ../../example-data/

For building the C++ parts of MOODS from the github repository, you need Swig in addition to your C++ compiler (tested with >=3.0.8). I find it generally convenient to build the extensions in place without doing python setup.py install:

# in MOODS/python/ directory
swig -c++ -python -outdir MOODS/ core/scan.i
swig -c++ -python -outdir MOODS/ core/tools.i
swig -c++ -python -outdir MOODS/ core/parsers.i
python setup.py build_ext --inplace

Bindings for other scripting languages

As the MOODS-python interfaces are built with Swig, it is in principle fairly straightforward to convert MOODS to other scripting languages, though in practice it may require some non-trivial effort. If you are interested in contributing interfaces in other languages than Python, feel free to get in touch!

In case you are wondering what happened to the Perl interfaces that used to exist in MOODS 1.0, there's this Swig issue that is making this something of a pain (in addition to the fact that no-one with any Perl experience is currently working on MOODS).