def _prep_python(): global release amalgamate(core_files + ['src/coco_c_runtime.c'], 'build/python/cython/coco.c', release) copy_file('src/coco.h', 'build/python/cython/coco.h') copy_file('src/bbob2009_testcases.txt', 'build/python/bbob2009_testcases.txt') expand_file('build/python/README.in', 'build/python/README', {'COCO_VERSION': hg_version()}) expand_file('build/python/setup.py.in', 'build/python/setup.py', {'COCO_VERSION': hg_version()})
def build_matlab(): global release amalgamate(core_files + ['src/coco_c_runtime.c'], 'build/matlab/coco.c', release) copy_file('src/coco.h', 'build/matlab/coco.h') write_file(hg_revision(), "build/matlab/REVISION") write_file(hg_version(), "build/matlab/VERSION") run('build/matlab', ['matlab', '-nodisplay', '-nosplash', '-r', 'setup, exit'])
def build_c_mo(): # added for the multiobjective case global release amalgamate(core_files + ['src/coco_c_runtime.c'], 'build/c/mo/coco.c', release) copy_file('src/coco.h', 'build/c/mo/coco.h') # copy_file('src/bbob2009_testcases.txt', 'build/c/bbob2009_testcases.txt') write_file(hg_revision(), "build/c/mo/REVISION") write_file(hg_version(), "build/c/mo/VERSION") make("build/c/mo", "clean") make("build/c/mo", "all")
def build_c(): global release amalgamate(core_files + ['src/coco_c_runtime.c'], 'build/c/coco.c', release) copy_file('src/coco.h', 'build/c/coco.h') copy_file('src/bbob2009_testcases.txt', 'build/c/bbob2009_testcases.txt') write_file(hg_revision(), "build/c/REVISION") write_file(hg_version(), "build/c/VERSION") make("build/c", "clean") make("build/c", "all")
def build_r(): global release copy_tree('build/r/skel', 'build/r/pkg') amalgamate(core_files + ['src/coco_r_runtime.c'], 'build/r/pkg/src/coco.c', release) copy_file('src/coco.h', 'build/r/pkg/src/coco.h') expand_file('build/r/pkg/DESCRIPTION.in', 'build/r/pkg/DESCRIPTION', {'COCO_VERSION': hg_version()}) # FIXME: it seems that this doesn't work, because it writes '0.0.789' instead of 0.0.789 rscript('build/r/', ['tools/roxygenize']) run('build/r', ['R', 'CMD', 'build', 'pkg'])
def build_java(): global release amalgamate(core_files + ['src/coco_c_runtime.c'], 'build/java/coco.c', release) copy_file('src/coco.h', 'build/java/coco.h') write_file(hg_revision(), "build/java/REVISION") write_file(hg_version(), "build/java/VERSION") run('build/java', ['javac', 'JNIinterface.java']) run('build/java', ['javah', 'JNIinterface']) run('build/java', ['gcc', '-I/System/Library/Frameworks/JavaVM.framework/Headers', '-c', 'JNIinterface.c']) run('build/java', ['gcc', '-dynamiclib', '-o', 'libJNIinterface.jnilib', 'JNIinterface.o']) run('build/java', ['javac', 'Problem.java']) run('build/java', ['javac', 'Benchmark.java']) run('build/java', ['javac', 'demo.java'])