Skip to main content

Small build system

Project description

Mapyr v.0.8.2

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. Footer will clone the Mapyr repo if it no exists yet. The Mapyr repository is not expected to become part of your project, but build.py.

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.2.tar.gz (11.4 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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapyr-0.8.2.tar.gz
  • Upload date:
  • Size: 11.4 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.2.tar.gz
Algorithm Hash digest
SHA256 6cc425b753ef76d452a8fb6101370d956cf1975fb54cc4ee2639b4d9efba408e
MD5 eecd560bc6f67d8804085ce5e92deee4
BLAKE2b-256 6b567ece780fefe8f70e25dc418c36a56731e971d4942bb9b1bd7b2b389c143b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mapyr-0.8.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 331a6a028bebd94eaac4fb654ed7cf5914cf7e89ad1bd1e5f9d001bf7d11e321
MD5 bbd478e19bad2263934b484555ce180d
BLAKE2b-256 0aab79eb9c99024fdf5bc48c6b167a30be28b510ef8672f533f3b466c5ff5b7a

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