Metadata-Version: 2.4
Name: pymake314
Version: 1.0.0
Summary: A pure-Python Makefile interpreter — use make without installing make
License: MIT License
        
        Copyright (c) 2026 pymake-dev
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/pymake-dev/pymake314
Project-URL: Repository, https://github.com/pymake-dev/pymake314
Project-URL: Issues, https://github.com/pymake-dev/pymake314/issues
Project-URL: Changelog, https://github.com/pymake-dev/pymake314/blob/main/CHANGELOG.md
Keywords: make,makefile,build,build-tool,automation,devops,ci
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```bash
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

```python
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](LICENSE) for details.
