Craftr is a pythonic meta build system for Ninja that is fast, cross-platform, easy to use and allows for fine grain control of the build process. In Craftr, build definitions are generated using Python scripts.
The simplest possible example
# craftr_module(hello_world)
load_module('compiler')
cxx = compiler.CxxCompiler()
Objects = cxx.objects(
sources = glob(join(project_dir, 'source/**/*.cpp')),
)
Program = cxx.executable(
filename = 'main',
inputs = [Objects],
)
To build, run
mkdir build && cd build
craftr -c.. export && ninja
Check out the Wiki for additional information and examples!
Grab the latest release from this repository and install using Pip.
You might want to do so in a virtualenv. To always use the latest
version of Craftr, consider using an editable installation (-e
)
and update by pulling the latest changes into the repository.
git clone git@github.com:craftr-build/craftr.git && cd craftr
virtualenv .env && source .env/bin/activate
pip install -e .
Requirements
Copyright (C) 2015 Niklas Rosenstein