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.1.tar.gz (4.1 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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for njinja-0.1.tar.gz
Algorithm Hash digest
SHA256 cf20ed26f66cbc69b0cc41e15352e7e21cc14deb1d1dab4350962e4d0f85a342
MD5 46a3f9b6382a00b01d27aec189ef73c0
BLAKE2b-256 5f697b6251819b267fa747777bf13bdb1616425450ffc0bfc33ce5cfd9784478

See more details on using hashes here.

File details

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

File metadata

  • Download URL: njinja-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6968a7e640f15e23fbdff7d0aeefeb3e698ae05fe41a43a2342fe226acaacb4
MD5 a2cd80d3ca90c96d882564ebc22babf1
BLAKE2b-256 8d0e41c30818f43d8226784c0b38a326f5fba89b9ac832e372ec6db13bd3deff

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