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.4.tar.gz (7.4 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.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cpybuild-0.1.4.tar.gz
  • Upload date:
  • Size: 7.4 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.4.tar.gz
Algorithm Hash digest
SHA256 6f9bcc08a8e2e0bd520cbadbfd3663c2580658a272ff55589d052c6a1d65702b
MD5 2016e83b8df840e7bb8b4f21aeb9b619
BLAKE2b-256 5035066ee692a677e4da624a4c145102a1f696936d27d41079540c4406f33374

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cpybuild-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a1a2307f42aeb9c033e24dde24537e4ceb5789743b444826eea1630db5512b95
MD5 d03cac16f45d15be47c3535eee60b0d5
BLAKE2b-256 80c6f47d1aecb16e7df587d38f95de7ce0e262b91cf42169b881d2a153187acd

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