pymake314
A pure-Python Makefile interpreter. Use make without installing make.
pip install pymake314
No dependencies. Works on any OS where Python 3.8+ is available — including environments where you cannot install system packages.
CLI usage
pymake # run the default target from ./Makefile
pymake build # run a specific target
pymake build test # run multiple targets in order
pymake -n build # dry run — print commands, don't execute
pymake -s test # silent — don't echo commands
pymake -k test # keep going after errors
pymake -i test # ignore all errors
pymake -f path/to/Makefile # use a specific Makefile
pymake -C path/to/dir # change to directory before doing anything
pymake CC=clang build # override a variable
pymake -p # print parsed variable/rule database and exit
Python API
from pymake import run
rc = run() # default target, ./Makefile
rc = run("build", "test") # multiple targets
rc = run("all", makefile="path/to/Makefile") # custom Makefile path
rc = run("build", variables={"CC": "clang"}) # variable overrides
rc = run("all", dry_run=True) # dry run
rc = run("all", silent=True) # silent mode
rc = run("all", ignore_errors=True) # ignore errors
rc = run("all", keep_going=True) # keep going after errors
run() returns 0 on success and a non-zero exit code on failure.
It raises FileNotFoundError if the Makefile is missing, and RuntimeError
on dependency cycles or missing targets.
Supported Makefile features
| Feature | Supported |
|---|---|
= recursive variables |
✅ |
:= / ::= immediate variables |
✅ |
?= conditional assignment |
✅ |
+= append |
✅ |
!= shell assignment |
✅ |
$(VAR) / ${VAR} expansion |
✅ |
$(VAR:.c=.o) suffix substitution references |
✅ |
$(VAR:%.c=%.o) pattern substitution references |
✅ |
.PHONY targets |
✅ |
Pattern rules (%.o: %.c) |
✅ |
Automatic variables $@ $< $^ $* |
✅ |
@ silent prefix |
✅ |
- ignore-errors prefix |
✅ |
include / -include |
✅ |
| Backslash line continuation | ✅ |
Inline # comments |
✅ |
| File timestamp (mtime) up-to-date checks | ✅ |
-C directory flag |
✅ |
-n dry run |
✅ |
-s silent mode |
✅ |
-k keep going |
✅ |
-i ignore errors |
✅ |
ifeq / ifdef conditionals |
🔜 planned |
$(foreach ...) / $(call ...) |
🔜 planned |
Parallel jobs (-j) |
🔜 planned |
Why pymake?
Some environments — CI containers, restricted servers, embedded systems,
Windows machines — don't have make available and you can't install it.
pymake gives you the same workflow (make build, make test, make clean)
with nothing but Python.
License
See LICENSE for details.
Metadata
Release files for pymake314 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymake314-1.0.0.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymake314-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / pymake314-1.0.0.tar.gz
| Download URL | pymake314-1.0.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bad217220fd1172995639c63cd055a90bcbfd4cef66e8a1872a8ea79e4439fb9
|
|
BLAKE2b-256 checksum How to use checksums |
fe5afe5872d4b33e6b96dfd17374b15a552898d4bdf9cad17ca30e909f20fdd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / pymake314-1.0.0-py3-none-any.whl
| Download URL | pymake314-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdbaac9a9eb8c8e2f34d25a8f8fe873d7791b4ab657ede9528084190d6ccd6b9
|
|
BLAKE2b-256 checksum How to use checksums |
45994736690150a64462ac6bcfad9ad4b74042cd30ecff9fe4db2a19e1e0ae72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|