Skip to main content

Small build system

Project description

Mapyr v.0.8.3

Mapyr - is a small build system written in Python3, uses python as build file (no new languages) and inherits the Makefile rule system, 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:

#!/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:

python3 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapyr-0.8.3.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapyr-0.8.3-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file mapyr-0.8.3.tar.gz.

File metadata

  • Download URL: mapyr-0.8.3.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mapyr-0.8.3.tar.gz
Algorithm Hash digest
SHA256 7b808b462e13c5dfd0f2a303081b4d2c00c20562f49c945fa88369c297119cb4
MD5 1533d263d2d2b15979345cf1d96b90de
BLAKE2b-256 2e2292da679b865215ff01fb74a081f2bd78fb75217b7fc802d551c64cbd68d2

See more details on using hashes here.

File details

Details for the file mapyr-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: mapyr-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mapyr-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc7bee3fbd9db483b3e30ca9b4d182cb0932e52ffb03a36393e76d3edd8a4ff8
MD5 1990fdb6450324763960909d4f8f814d
BLAKE2b-256 1c8aee42d86fa42cc2940222c3729f612d5e432d3ebb8a55750f1b0ec00996ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page