Metadata-Version: 2.3
Name: mapyr
Version: 0.8.6
Summary: Small build system
License: MIT
Keywords: mapyr,build,makefile,c++
Author: AIG
Author-email: AIG.Livny@gmail.com
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
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.13
Description-Content-Type: text/markdown

# Mapyr v.0.8.6

Mapyr - is a small build system written in Python3, uses python as build file (no new languages) and inherits the Makefile rule sys/tem, extending and complementing it.

Advantages of Mapyr:
 - Small size
 - Project system
 - Simple hierarchy
 - Modular addon system makes it easy to add new languages or
 - It can be used as is for any language. Language modules just for convenience.

# Usage
Mapyr starts with `build.py` file.
Example of `build.py`:
```python
#!/usr/bin/env python

from mapyr import *

def get_project(name:str) -> ProjectBase:
    cfg = ConfigBase()
    return ProjectBase('debug','target-file', cfg)

if __name__ == "__main__":
    process(get_project)
```

`name` can be used to identify projects. This example uses base classes, but for more convenient using there are addons like `c.py` and they must provide its own classes (example: `c.Project`,`c.Config` from `c.py`)

run:
```shell
./build.py
```

## Rule system
Rule system come directly from GNU Make:

`target` - file (or phony name) that must be exists or be built

`prerequisites` - list of rules that we have to build before this rule

`exec` - what we must do to get target.

If any from prerequisites newer than taraget then rebuid rule.

### Projects
`Project` needed to share configations between them. `Project` joins multiple rules of one unit, and keep private, protected and public configurations. They act like in C++, but are not as strict. You choose which configuration to take from the subproject. But nevertheless, they are separated in order to understand what the project wants to show us and what to leave for internal use.

`private` - only for this project

`protected` - for this and children

`public` - for anyone who want include us as subproject


### You can look at examples in the `test` directory
