Building blocks for make-like utils
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libmake-0.3.1-py3-none-any.whl.
File metadata
- Download URL: libmake-0.3.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d4c9e513eabe95ca148994052eb838d915a05e55e702029168d785c25b5869a
|
|
| MD5 |
5cc52e0bbfa048b22a0c4998237cc6cb
|
|
| BLAKE2b-256 |
e9cd6ab72bde88bbd77bb8d063bdfd2482bcf993e928133fc2630be5f04b49fc
|