Skip to main content

Make build tool substitute written in Python.

None

Project description

https://img.shields.io/pypi/v/faff.svg?style=flat-square https://img.shields.io/pypi/status/faff.svg?style=flat-square https://img.shields.io/pypi/l/faff.svg?style=flat-square https://img.shields.io/travis/mojzu/faff/master.svg?style=flat-square https://img.shields.io/coveralls/mojzu/faff.svg?style=flat-square

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

None

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)

Uploaded Source

Built Distribution

faff-0.1.8-py2.py3-none-any.whl (22.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page