Skip to main content

a new kind of make tool

Project description

makepyz - the makefile alternative

Intro

makepyz is a simple tool to collect task in a make.py file, in the same spirit of a Makefile: it allows you to write portable tasks in python leveraging an extensive internal library.

Install

There are two ways to install it, in standalone mode (eg. no dependencies) good for project that want to not rely on the makepyz project (or they want to keep a tight control on third parties code), and the usual pip installed package.

Using pip

You can use pip to install makepyz:

pip install makepyz

Stand alone

In standalone mod you can just get the latest makepyz:

curl -LO https://github.com/cav71/makepyz/raw/master/makepyz
echo hello

Using

First you need to create a make.py file:

from makepyz import api

@api.task()
def info(arguments: list[str]):
    """this is the hello world"""
    print(  # noqa: T201
        f"""
    Hi!
    python: {sys.executable}
    version: {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}
    cwd: {Path.cwd()}
    arguments: {arguments}
    """)

Then:

makepyz

API

api.task - decorates a new makepyz task.

Example:

from make import api

@api.task()
def hello():
    print("Hello world")

api.which - finds an executablek. Example:

from make import api

print(api.which("dir"))

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

makepyz-0.0.1.tar.gz (23.7 kB view hashes)

Uploaded Source

Built Distribution

makepyz-0.0.1-py3-none-any.whl (21.6 kB view hashes)

Uploaded Python 3

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