Skip to main content

PyProd: More Makeable than Make

Project description

PyProd is a Python script that can be used as an alternative to Makefile. By leveraging Python’s versatility, it enables you to define build rules and dependencies programmatically, allowing for dynamic configurations, integration with existing Python libraries, and custom build logic not easily achievable with traditional Makefiles. For detailed documentation, please refer to the official documentation.

Features

  • Define build rules in Python: Use Python functions to create clear and concise build logic.

  • Specify dependencies for each rule: Automatically track and resolve dependencies between files, such as source files and headers.

  • Easily extendable with custom Python functions: Integrate custom logic for specialized tasks, like code linting or deployment.

  • Manages virtual environments: Automatically create and manage virtual environments for each project, ensuring a clean and isolated build environment.

Installation

To install PyProd, simply use pip:

pip install pyprod

Usage

In PyProd, a traditional Makefile for C can be expressed as a Python script like this:

CC = "gcc"
CFLAGS = "-I."
DEPS = "hello.h"
OBJS = "hello.o main.o".split()

@rule("%.o", depends=("%.c", DEPS))
def compile(target, src, *deps):
    run(CC, "-c -o", target, src, CFLAGS)

@rule("hello.exe", depends=OBJS)
def link(target, *objs):
    run(CC, "-o", target, objs)

def clean():
    run("rm -f", OBJS, "hello.exe")

all = "hello.exe"

To run the build script, simply execute:

$ cd project
$ pyprod

License

PyProd is licensed under the MIT License. See the LICENSE file for more details.

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

pyprod-0.1.0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distribution

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

pyprod-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pyprod-0.1.0.tar.gz.

File metadata

  • Download URL: pyprod-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for pyprod-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d22f1ac87cd9fc3d908d034f6fa6248326d474e713c1cdb6141556ed93ed7a6
MD5 27f794eb9ff02f593332b947b983609e
BLAKE2b-256 f7eccbf3d826d7b94955c4b1c13aa1be78c789f1d50ac9d5191b8177f4fcabb1

See more details on using hashes here.

File details

Details for the file pyprod-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyprod-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for pyprod-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d831424d2dd476bd76cdcda4113c70eef141d580fd7b948a79f2cc8bff06d607
MD5 b07fe08b9662a90051cd28d73f831734
BLAKE2b-256 a8e9fd9aad765215e34bc3b276cb4a8f4eb0216b231b716ed76a85d451b27b14

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