Skip to main content

A Python build tool that transpiles Python code to C using Cython.

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.3.tar.gz (7.3 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.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cpybuild-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fb88f96bcda06565f2d429287e90d6b13535a44bd52159d43852476a7890bcef
MD5 2a6bebfc68900392bc9f1c6479afb671
BLAKE2b-256 fb2613a049b8d96d1ea33fb6cdd898b5120e6e617faca63f490a196f27cd20e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cpybuild-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a328b023f4fb880b94aabd20149e7e41cea723e167eaff94d9962b00fab48e18
MD5 c22c290c9efee2a677655994a6a79239
BLAKE2b-256 73526d462bbbeed4e04e24354b0c637a4960d6c2b689ee0e0acff5dc68e21d75

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