Skip to main content

A Python build tool that transpiles Python code to C using Cython. Inspired by Maven/Gulp, but for Python.

Project description

cpybuild

cpybuild is a Python build tool that transpiles Python code to C using Cython, inspired by tools like Maven and Gulp but designed for Python projects. It automates the build, clean, and test workflow for Python-to-C projects and can be installed as a pip package with a simple CLI.

Features

  • Transpile Python code to C using Cython
  • Simple CLI: cpybuild [init|build|clean|test]
  • Configurable build output location via CPYBUILD_LOC environment variable
  • Ensures commands are run from the project root
  • Easily extensible for custom tasks

Installation

pip install cpybuild

Quick Start

  1. Initialize your project:

    cpybuild init
    

    This creates a cpybuild.yaml config file.

  2. Build your project:

    cpybuild build
    

    This transpiles Python files (as configured in cpybuild.yaml) to C in the build directory.

  3. Clean build artifacts:

    cpybuild clean
    
  4. Run tests:

    cpybuild test
    

Configuration

Edit cpybuild.yaml to specify source files and output directory:

sources:
  - src/**/*.py
output: build/

Environment Variable

Set CPYBUILD_LOC to override the build output directory:

export CPYBUILD_LOC=/custom/build/dir
cpybuild build

License

MIT

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

cpybuild-0.1.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

cpybuild-0.1.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cpybuild-0.1.2.tar.gz.

File metadata

  • Download URL: cpybuild-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for cpybuild-0.1.2.tar.gz
Algorithm Hash digest
SHA256 abbb78a44b14fb42fbcefb656635cf3ae90a1f52e9df7f3f1ab470faa4f1b681
MD5 550d3552bfd33daa8b15c07afc1a5bee
BLAKE2b-256 54c49acfb1bc09e79e8267bcd6fd8a73182940bce472b40acbc7db6a5cf60eee

See more details on using hashes here.

File details

Details for the file cpybuild-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cpybuild-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for cpybuild-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66205424ba3322d0108de8ad6ed2fece753128fb93657c386f129fd780d6123e
MD5 22607131518a7572d0fa721fd34ec92f
BLAKE2b-256 7290ed1eb52cdba5bd1b4ee8cab99ec85ea4103ae77b1ea7640979459c466c3d

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