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

With 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.3.0.tar.gz (416.6 kB view details)

Uploaded Source

Built Distribution

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

pyprod-0.3.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyprod-0.3.0.tar.gz
  • Upload date:
  • Size: 416.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyprod-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ba19eb36a3ca543765b5e8396e26d5f70cbfa9c269c31b96a2ba8b4f973c524b
MD5 22894279354575eff7f530de84e407fe
BLAKE2b-256 a383758a5b2456b67c05341b70d2da4ed3aff1ae9cc95fdc346add06a1687e14

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprod-0.3.0.tar.gz:

Publisher: publish.yml on atsuoishimoto/pyprod

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pyprod-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyprod-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b48d7bc43b999ad8b4e90b50e89ad49d1a2ac84e8e7a540fc7c68dcb1869fcb6
MD5 6e9ffe191b86c51278f22f3cbc0f6cf9
BLAKE2b-256 02c845bd416213090103d9f40841c28f39a0e81b0a9f4106d4cdd9df6fe806da

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprod-0.3.0-py3-none-any.whl:

Publisher: publish.yml on atsuoishimoto/pyprod

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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