Skip to main content

general purpose built tool

Project description

irori - build tool

Copyright 2019 SiLeader.

features

  • configuration file is Python script
  • suffix rule
  • concurrent execution

how to use

pip install irori

write configuration script (makefile.py).

from irori.rules import SuffixRule, StaticRule, LinkRule
from irori import context as ctxt, runner
from irori.depend import Dependencies

import glob


target = 'hello.elf'


def build(_: ctxt.BuildContext):
    return LinkRule(
        command='clang++ -fPIC -o $@ $^',
        debug='-O0 -g',
        release='-O2',
        rules=SuffixRule(
            cpp=StaticRule('g++ -std=c++11 -c $< -o $@', debug='-O0 -g', release='-O2'),
            c=StaticRule('gcc -std=c11 -c -O2 $< -o $@', debug='-O0 -g', release='-O2')
        )
    )


def depend(_: ctxt.BuildContext):
    return SuffixRule(
        cpp=StaticRule('g++ -MMD -c $< -o $@'),
        c=StaticRule('gcc -MMD -c $< -o $@')
    )


def recipes():
    return {
        'build': build,
        'depend': depend
    }


def arguments(parser):
    pass


def find_files(_: ctxt.BuildContext):
    return glob.glob('*.c') + glob.glob('*.cpp')


runner.start(
    target,
    recipes=recipes, finder=find_files,
    arguments=arguments, dependencies=Dependencies(files=glob.glob('obj/*.d'))
)

run in makefile.py's directory.

irori build

license

GNU GPL version 3.0

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

irori-1.0.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

irori-1.0.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file irori-1.0.0.tar.gz.

File metadata

  • Download URL: irori-1.0.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for irori-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a9f497e576c5c7877c86192c310a4024384549b59082ebe767ec5eba3a318d01
MD5 d3c581678e7fee5db8c3da67cc48bacf
BLAKE2b-256 13b5d54e76ff4ff06e41d5795e6b3cd8f3d5675c51ee34ff6cc6481a5972265c

See more details on using hashes here.

File details

Details for the file irori-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: irori-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.1

File hashes

Hashes for irori-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e249e31f19cdf1681ae0e8be3f23b9a984865fd23e213dfc880881df3481d03
MD5 ab704f477e1945dbcd699349a3e30c8e
BLAKE2b-256 ae742aecdac815c0da5bd4ef45e2701fa8f0fcda36de36677519583fd522e980

See more details on using hashes here.

Supported by

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