Skip to main content

very simple C build plugin for hatch, supporting CPython only

Project description

hatch-c

build PyPI

Very simple C build plugin for hatch, supporting CPython only.

[build-system]
requires = ["hatchling>=1.20", "hatch-c"]
build-backend = "hatchling.build"

[[tool.hatch.build.hooks.hatch-c.extension]]
name = "mypackage.mylib"
sources = ["src/module.c"]
include-dirs = ["src/"] # paths to add with `-I`
library-dirs = [] # paths to add with `-L`
libraries = [] # libraries to link with `-l` 
extra-compile-args = []
extra-link-args = []
extra-objects = []
define-macros = [] # macros to define with `-D`
undef-macros = [] # macros to undefine with `-U`
py-limited-api = "cp39"  # optional limited API to use

hatch-c is driven by pydantic models for configuration and execution of the build. These models can themselves be overridden by setting build-config-class / build-plan-class.

Other Python Build Backends for C Extensions

Acknowledgments

This project was heavily modified and stripped down from https://github.com/python-project-templates/hatch-cpp

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

hatch_c-0.2.2.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

hatch_c-0.2.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file hatch_c-0.2.2.tar.gz.

File metadata

  • Download URL: hatch_c-0.2.2.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hatch_c-0.2.2.tar.gz
Algorithm Hash digest
SHA256 56a52fc0376c900c71116dc3fea54dbb74effb62db1bd13cce7866c254f587e9
MD5 52d9a3d17728138bb5e8fe03957aa340
BLAKE2b-256 e58ef2124f006ff39099f8f4c0c3f3d55e1f4ac7f00408aa1dd377e14c6f8aa8

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_c-0.2.2.tar.gz:

Publisher: build.yml on zacharyburnett/hatch-c

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

File details

Details for the file hatch_c-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: hatch_c-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hatch_c-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfd414bc0e18868ca62db413bfeb6f8e6d2977befa9a77294a5486dcb7d956fc
MD5 cfece021ded0224e17773cc290b2f377
BLAKE2b-256 c37e01b3e7411f880dd2e3b3c9ddb4a6fa65cc533eed066f90321f03a651b97f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_c-0.2.2-py3-none-any.whl:

Publisher: build.yml on zacharyburnett/hatch-c

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