Make build tool substitute written in Python.
Project description
Faff is a Make build tool substitute written in Python. Input files similar to Makefile’s define rules which are used to build arbitrary targets that may have dependencies.
Installation
Install using pip.
$ pip install faff
Quickstart
Create a file in a new directory called faffin.py.
$ mkdir -p DIR && cd DIR
$ touch faffin.py
Content of faffin.py file.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from faff import (Variable, FileTarget, Rule, Run)
# Absolute path to directory.
root = os.path.abspath(os.path.dirname(__file__))
# Root variable definition.
Variable("ROOT", root)
# File targets with path variable expansion.
SOURCE = FileTarget("{ROOT}", "main.c")
BINARY = FileTarget("{ROOT}", "main")
# Compile and run binary rule.
@Rule([BINARY, SOURCE])
def all(target, depends, args):
Run("gcc {_D} -o {_T}", root)
Run("main", root)
TODO
Documentation
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
faff-0.1.8.zip
(24.4 kB
view hashes)
Built Distribution
faff-0.1.8-py2.py3-none-any.whl
(22.2 kB
view hashes)