Skip to main content

General-purpose lightweight meta-build system for Ninja

Project description

njinja

njinja is a general-purpose lightweight meta-build system for Ninja.

It is for people who:

  • need the flexilibity of make(1) (e.g. wildcards) but want to migrate away from its unclean language

  • need the lightweight and principled design of ninja(1) but need a equally lightweight (and principled) way to generate its build files

  • have an unusual project structure that cannot be cleanly handled by other common meta-build systems for ninja, that are too special-purpose or focus on a particular programming language that isn't what your project actually uses.

Install via pip:

$ pip3 install -U njinja

Usage

  1. Write your Ninja build file as a Jinja template, named (e.g.) build.ninja.j2. Within this template, you may refer to variables that contain build inputs that cannot be known (or are inconvenient to know) in advance.

  2. Write a python build script, named (e.g.) build.py, that uses our njinja library to calculate these build inputs, populate the template with them, create a build.ninja file, and call ninja on this file all in one step.

See here for our basic example, that showcases a few different ways of calculating these build variables. Adapt this to whatever is suitable for your project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

njinja-0.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

njinja-0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file njinja-0.2.tar.gz.

File metadata

  • Download URL: njinja-0.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for njinja-0.2.tar.gz
Algorithm Hash digest
SHA256 2e008e89b442ee6ea4fc9e04d1a1559b79b9543cc84b5683f883e7c99ecce6a6
MD5 d56d473dd954acaa0b885c6487118fc2
BLAKE2b-256 4b3a2eca95fa7d1fa6d53e9b808edc3726f6104a0c0e7ecf6766a043d153acac

See more details on using hashes here.

File details

Details for the file njinja-0.2-py3-none-any.whl.

File metadata

  • Download URL: njinja-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for njinja-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1507c74a481ad9d9795df297bca0820fcea6202c03ebba31b2191f423a73af61
MD5 91914af51fa278cfdf641844022ae6ef
BLAKE2b-256 2d6cd0af2de049e738c78cd6eb5f2fd76849dc316c157cf60ac75e3d795f8051

See more details on using hashes here.

Supported by

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