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.1.tar.gz (6.1 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.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cpybuild-0.1.1.tar.gz
  • Upload date:
  • Size: 6.1 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.1.tar.gz
Algorithm Hash digest
SHA256 2a22102d8e76ab6a66155e4406cbb1f887db63b625706bcce7efed94bf1bbdc6
MD5 16adc9ca791b6b01b93ca88f6d3e50e8
BLAKE2b-256 b077e3e9068bc80b6a3bb41486a952f5880776bcdc0319505e84fb31cf5aaf4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cpybuild-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f639fde31e2022deaa7381c4b8b94f795118f77ee9d7a56c637ffc4ff8faf560
MD5 468f43b7800f8bc1b8de6a86bbbffd38
BLAKE2b-256 8f1044c24786a5134c6832ae6dac2b486377878ea38e167c39550b30a9407ceb

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