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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for njinja-0.3.tar.gz
Algorithm Hash digest
SHA256 ed312120326d095243c15c0984f5538f530efb6d1bfc6a2ffc63b6f8b5f0605b
MD5 3c5f780ffe40ca7fcd019249e7bfdc61
BLAKE2b-256 5db487cb8915ead6f7043b27e777abc9d7eed72548d359e19c396bcd6d33eec3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: njinja-0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f2e36ddbd4348cb865ae2a1be886fc780f8530a914a18a69edfe25ee63bfac43
MD5 cfd31ff1b75ad14923f59fa3334c750b
BLAKE2b-256 2c3b646e0e14f7678dc7f2b6291fdb4feb47b423fdd2b2478d7dde8e29348fde

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