Skip to main content

libmake.py

A python library for implementing makefile.py scripts.

Run with pymake!

# makefile.py

import shutil

import libmake
from libmake import rule_vars as r

makefile = libmake.Makefile()


@makefile.add_rule("ciao.html", ["come.md", "va.scss"])
def test_rule():
    # fp = first_prerequisite
    # t = target
    shutil.copy(str(r.fp), str(r.t))
    print("Ciao, come va?")


if __name__ == "__main__":
    libmake.run_make(makefile)

Non-goals

The goal of this package it's not:

  • to provide any pre-built Makefile
  • to deliver an alternative build-system for compiled languages

For the second one there is already make, and other tools specific for more recent languages.

Instead...

Makefile's logic it's useful for projects' tasks automation further than compiling code, e.g.:

  • compiling templates and contents
  • define project's specific commands
    • useful also for collaboration (and to save working patterns anyhow)

Usage

Define a makefile.py using building blocks provided, then run it as a script with targets (so do python makefile.py args... in place of make args...).

See tests/makefile.py for an example makefile definition, and run tests.py to show its output.

Metadata

Release files for libmake 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for libmake 0.3.1
File Interpreter ABI Platform Actions
libmake-0.3.1-py3-none-any.whl Python 3 none any Details for libmake-0.3.1-py3-none-any.whl

Release files / libmake-0.3.1-py3-none-any.whl

Download URL libmake-0.3.1-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d4c9e513eabe95ca148994052eb838d915a05e55e702029168d785c25b5869a
BLAKE2b-256 checksum
How to use checksums
e9cd6ab72bde88bbd77bb8d063bdfd2482bcf993e928133fc2630be5f04b49fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

Security for libmake 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page